Graphical construction (max, min, tangent line in a point) from simulink scope / multiplot graph
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (2)
Michele
le 29 Juil 2011
0 votes
3 commentaires
Paulo Silva
le 29 Juil 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
le 29 Juil 2011
for the best results try using the interp1 function
Michele
le 29 Juil 2011
Nelis Vandermeiren
le 30 Déc 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?
Catégories
En savoir plus sur Line Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

