In Symbolic Math, how do you output a partial derivative as a variable?
9 views (last 30 days)
Show older comments
Juan Pablo Velasco Ochoa
on 10 Jun 2019
Commented: Juan Pablo Velasco Ochoa
on 10 Jun 2019
Hello
How can I do this?
y = sin(theta)
yPrime = diff(y,t)
The output I need is omega*cos(theta)
Matlab outputs the partial derivative of theta with respect to t. How can I replace the partial derivate for a variable?
Thank you!
0 Comments
Accepted Answer
Walter Roberson
on 10 Jun 2019
odeFunction()
Or
syms theta(t) omega
dtheta = diff(theta,t);
y = sin(theta);
yPrime = subs(diff(y,t), dtheta, omega);
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!