Graphics Programs Reference
In-Depth Information
solve('x+y=3') solves for x , not y . If you want to solve for y in this
example, you need to enter solve('x+y=3','y') . MATLAB's default
variable for solve is x . If there is no x in the equation(s), MATLAB looks for
the letter nearest to x in alphabetical order (where y takes precedence over w ,
but w takes precedence over z , etc). Similarly for diff , int , and many other
symbolic commands. Thus syms w z; diff w*z yields z as an answer. On
occasionMATLABassignsadifferentprimarydefaultvariable—forexample,
the default independent variable for MATLAB's symbolic ODE solver dsolve
is t . This is mentioned clearly in the online help for dsolve . If you have doubt
about the default variables for any MATLAB command, you should check the
online help.
Search WWH ::




Custom Search