5.0

5.0 | 1 rating Rate this file 22 Downloads (last 30 days) File Size: 1.74 KB File ID: #33025

Convert inline to symbolic

by

 

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

| Watch this File

File Information
Description

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)

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
06 Sep 2013 Héctor Corte

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.

01 May 2012 Reza Aghideh

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

01 May 2012 Reza Aghideh

You made it easy,Thank you!

Contact us