I'm trying to find the derivative of an equation and plotting.
1 view (last 30 days)
Show older comments
so the data i was given was to plot the equation with respect to x and the derivative in the same graph but with dashed line. include legend as well plz. x=[-4<x<4] f(x)=x^3-2x^2-10sin^2(x)-e^0.9x
syms x x=-2:0.01:4; f=(x.^(3))-(2*x.^(2))-(10*sin(x).^2)-(exp(0.9*x)); df= diff(f,x); plot(x,f,'-') plot(x,df,'--'); legend('f(x)','f_(x)')
0 Comments
Answers (0)
See Also
Categories
Find more on Legend 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!