![]() ![]() Here is a check that the two answers are the same. D is not numerical parameter, but symbol for symbolic derivative operator. Here D denotes differentiation with respect to the independent variable. The availability of symbolic computations is due to the existence of the Symbolic Toolbox available from The Mathworks, Inc. Of course if we do not mind do a bit of paper work, we can get dy/dx = -(partial f/partail x)/(partial f/partial y) from which we can get the much shorter code %// Implicit differentiation identity With the Symbolic Math Toolbox comes a new matlab datatype - symbolic object. %// Finally if we do not want all of the y(x) terms, %// then replace them with y %// df will have diff(y(x), x) terms in it, %// we want to solve for this term, %// to make it easier we should first replace it with a variable %// and then solve %// Then you need to differentiate with respect to x %// Then you need to tell Matlab that y is a function of x, %// you do this by replacing y with y(x) %// Firstly you need to define a function `f` in terms of `x` and `y`. Here is some code that does what you want, all explanation are in the comments, note that this code assumes that you want Matlab to do almost all of the Mathematical thinking for you. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |