Comments (12)
Improved but still need 2D expansions and orderMode
from symbolic.
can i try 2D expansions ?
from symbolic.
Sure @trueutkarsh that would be great.
Maybe this is helpful? http://stackoverflow.com/questions/22857162/multivariate-taylor-approximation-in-sympy
from symbolic.
@cbm755 i have written the python code(function) which does it ,tested and compared it with few outputs from the matlab .Its working fine.(i havent checked on when taylor series cant be computed .. will do so soon..)
But I am facing problems in how to incorporate it in octave. Since the function is not present in sympy how I can I use it ?
Thanks
from symbolic.
Sounds great so far.
If you look in inst/@sym/taylor
, near the end there is a cmd = { ' ... ' };
bit. This is python code, you can probably do something similar. Fork this project, start a new branch, then send a pull request--- even if its not perfect---we'll help!
from symbolic.
cool that should do the job..
as soon as I'll incorporate it in octave will send a pull request.
from symbolic.
@cbm755 Now that expr=f(x,y) my code needs a list [x,y] as parameter .
"(f, x, a, n) = _ins' " interprets f as expr ,I want it to interpret x as list of variables and 'a' as list of evaluation points .
Right now it throws
"Python exception: TypeError: 'Zero' object does not support indexing
occurred at line 8 of the Python code block
"
'expr=f'
'var=x'
'i=a'
'expn=expr.subs([(var[x],i[x]) for x in range(len(var))]) ' %this is line 8
from symbolic.
Bit hard for me to comment without seeing your whole code... I suggest you start the pull request, even if it doesn't work yet (then I can see the actual code and even check it out).
from symbolic.
here's the pull request #364
Edit 1: is there some other way to contact you other than commenting here since you're not on irc channel and there's not much help for octsympy their.
from symbolic.
Not at the moment, no. I should probably get on IRC.
from symbolic.
@cbm755 I am facing a new problem. the follwing code snippet does'nt seems to work
cmd ={'(f, x, a, n) = _ins'
'z=f'
'if not isinstance(x,list):'
' z=(z.series(x,a,n).removeO())'
'var=list(x)'
'for m in range(len(var)):'
' z=z.series(var[m],a[m],3).removeO()'
'return nsimplify(z)'
};
Using this it woks for single variable taylor series but not multiple variable.
if this code snippet works then we can simply merge mtaylor and taylor.
Rather I am using
cmd ={'(f, x, a, n) = _ins'
'z=f'
'if len(z.atoms(Symbol)) ==1 :'
' return nsimplify(z.series(x,a,n).removeO())'
'var=list(x)'
'for m in range(len(var)):'
' z=z.series(var[m],a[m],3).removeO()'
'return nsimplify(z)'
};
Using this single variable works and multivariable also works
but this case
"mtaylor(sin(x+y),x)" is not working.
What am I missing ? Please help.
from symbolic.
you could just use two cmd
and two calls to python python_cmd
, one in case numel(x)>1
and one when numel(x) == 1
for now. Once that works, worry about whether code is nicer by merging them...
from symbolic.
Related Issues (20)
- sympy 1.12 issues from assumptions, recent failures HOT 2
- Forget to update tarball filename in v3.1.1 release (?) HOT 1
- unexpected error creating a matrix: octave_base_value::map_value(): wrong type argument 'scalar' HOT 1
- Cap the wait time in readblock.m
- Using octsympy in MATLAB HOT 5
- update links for Pythonic package move HOT 1
- Moving the repo HOT 2
- metainfo: fix Octave ID to match upstream
- SyntaxWarning: invalid escape sequence '\(' HOT 1
- Bernoulli failures on SymPy 1.12 HOT 2
- sym(x, 'r') heuristics poor for small x < 1e-17 HOT 4
- sym 'r' flag ignored for arrays HOT 1
- vpasolve compatibility: multivariable outputs should return as a struct
- piecewise: matlab compatibility issue for certain interval forms HOT 3
- fplot error plotting piecewise symbolic variable HOT 1
- isequal of two unit vpa precisions HOT 1
- CI: nodejs warnings
- "See also" help is doubling all the `@` signs HOT 3
- metainfo: developer_name is deprecated
- laplace wrong answer in t*sin() or t*cos() transforms HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symbolic.