Graphical construction (max, min, tangent line in a point) from simulink scope / multiplot graph
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (2)
Michele
il 29 Lug 2011
0 voti
3 Commenti
Paulo Silva
il 29 Lug 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
il 29 Lug 2011
for the best results try using the interp1 function
Michele
il 29 Lug 2011
Nelis Vandermeiren
il 30 Dic 2011
0 voti
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?
Categorie
Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

