For example, find the derivative of f (x,y) with respect to x. I'd suggest reading up more on the Symbolic Math toolbox and and figuring out what your problem really is. You can differentiate symbolic functions, integrate or simplify them, substitute their arguments with values, and perform other mathematical operations. The basic toolbox also allows you to access functions in the Maple linear algebra package. Which returns NaN indicating that it used extrapolation (see the help/ documentation).Īll in all, I can't figure out what you're trying to do or why you're using interpolation. The basic Symbolic Math Toolbox is a collection of more than 100 MATLAB functions that provide access to the Maple kernel using a syntax and style that is a natural extension of the MA TLAB language. If you want to evaluate the interp2 line, it appears that you have all of the necessary values: interp2(,4,-3) Generally, if you don't see sym/thefuncname listed at the bottom when you get help for a function funcname, then that function doesn't have a version for symbolic math (or you can directly search help sym/funcname). Additionally, as you discovered, interp2 doesn't accept symbolic inputs. Symbolic Math Toolbox lets you analytically perform differentiation, integration, simplification, transforms, and equation solving.
You can create, run, and share symbolic math code using the MATLAB Live Editor. From Scalar ODE to Coupled First-Order System. Next, your seventh equation isn't even an equation as there's no = anywhere. Symbolic Math Toolbox provides functions for solving, plotting, and manipulating symbolic math equations. But before we can convert the symbolic form of the ODE to a function handle accepted by ode45, we must convert the scalar form of the ODE to a coupled first-order ODE system. Indeed, along with your first equation, EM + ICE = FD, you can use them to solve for the fact that EM = -3. You specified in your fifth and sixth equations that FD = 1 and ICE = 4. These new features let you make the worklfow for solving ODEs and testing solutions much more smooth and convenient. The last three equations should look pretty silly to you as they provide no information. In R2012a, symbolic equations and symbolic functions were introduced in the Symbolic Math Toolbox. You might try writing out what it represents on paper or doing just this: syms FD ICE EM GEN I don't know if your system is just an example, but it can be solved trivially by inspection without the use of solve.