File Exchange

image thumbnail

Convert inline to symbolic

version 1.0 (1.74 KB) by

Convert an inline function into symbolic so you can use symbolic operators like diff() or jacobian()

0 Downloads

Updated

View License

This program converts an inline expression into a symbolic expression, so you can use it on many Matlab operators that inline expression dosen't
work.

Usage:
Inputs:
fi=an inline function made with different names for each variable

Output:
f0=the same function fi, but converted into a symbolic function

Example:
Create an inline object that can't be simbolic differenciated
fi=inline('x^2+3*y-z^4','x','y','z')
f0=inline2sym(fi)
Now the expresion can be differenciated
syms x;diff(f0,x)

Comments and Ratings (3)

Héctor Corte

Héctor Corte (view profile)

Sorry for the delay in the comment. Just in case anybody reads it. I check it back in may 2012 and everything worked fine. And I checked again now on a completely different Matlab version and it also works. Remember that you can only use inline functions as inputs inline2sym.

Reza Aghideh

You Know? But it doesn't work, Has some error In line 35.

Reza Aghideh

You made it easy,Thank you!

MATLAB Release
MATLAB 7.10 (R2010a)
Acknowledgements

Inspired: mmDerivative(t,y)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video