Implicit derivative with Matlab symbols
1 view (last 30 days)
Show older comments
Is it possible to have MATLAB do implicit differentiation with its symbols? I have the following code
syms x;
y = symfun(sym('y(x)'), sym('x'));
yPrime = symfun(sym('y+(2*x)-1'), [sym('x'), sym('y')]);
diff(yPrime, x, 1)
From this I get
ans(x, y) =
2
but what I want to get (in some form) is
ans(x, y) =
dy/dx + 2
Is that possible?
3 Comments
Walter Roberson
on 12 Nov 2015
The MATLAB version does matter because the way to write your code cleanly would depend upon how old your MATLAB is.
Answers (1)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!