how to calculate derivative of a string
7 views (last 30 days)
Show older comments
saeed rezaei
on 1 Apr 2019
Commented: Ashesh Choudhury
on 30 Sep 2020
dear all
i have a problem with calculating the derivative of a aglebraic expression which is string. how can i use diff to calculate the derivative of expression?
the problem is as below:
eq='x^2+x';
f=str2func(['@(x)',eq]);
g=diff(f);
thanks alot
0 Comments
Accepted Answer
More Answers (1)
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!