how to calculate the derivative of a matrix
9 views (last 30 days)
Show older comments
I have 2 huge data as 2 separate matrixes which gives me a graph.I want to calculate the derivative of the graph at the maxmum and draw the tangent line .
4 Comments
Answers (1)
Rik
on 9 Dec 2022
Jan has all but given you the function you should be using: the max function.
S=load(websave('data.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1225492/load%20depth.mat'));
depth01=S.depth01;
load01=S.load01;
plot(depth01 , load01 , "g")
[max_load,max_ind]=max(load01);
max_depth=depth01(max_ind);
hold on,plot(max_depth,max_load,'r*'),yline(max_load,'r'),hold off
7 Comments
Rik
on 10 Dec 2022
If you needed to calculate the slope of those positions by hand, how would you do that?
See Also
Categories
Find more on Directed Graphs 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!