Graphical construction (max, min, tangent line in a point) from simulink scope / multiplot graph
Show older comments
Hi all, i've the graph from a simulink simulation in a multiplot graph;
then i need to find the point of maximum slope of that graph (along with its x, y coordinates), in that point i need to plot the tangent line to the graph, and then plot the intersections with x axis and the extrapolation from max value of graph of this tangent line. To make simpler to explain i've an image of what i would to obtain:
I've already tried to send graph data to workspace, but then plotting it i lose the time x axis...
Any help would be very appreciated.
Accepted Answer
More Answers (2)
Michele
on 29 Jul 2011
0 votes
3 Comments
Paulo Silva
on 29 Jul 2011
Here's one way to do it, not the best but should work
st1=.268*max(si);st2=.632*max(si);
idx1=find(si>=st1);idx2=find(si>=st2);
plot(st(idx1(1)),st1,'ro')
plot(st(idx2(2)),st2,'go')
Paulo Silva
on 29 Jul 2011
for the best results try using the interp1 function
Michele
on 29 Jul 2011
Nelis Vandermeiren
on 30 Dec 2011
0 votes
Hello
I need to do the same thing, but here is my question: How can you plot the tangent line on the (step-response) graphic where the slope is max? and how to add those intersection points?
Categories
Find more on Line Plots 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!
