Graphical construction (max, min, tangent line in a point) from simulink scope / multiplot graph
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (2)
Michele
el 29 de Jul. de 2011
0 votos
3 comentarios
Paulo Silva
el 29 de Jul. de 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
el 29 de Jul. de 2011
for the best results try using the interp1 function
Michele
el 29 de Jul. de 2011
Nelis Vandermeiren
el 30 de Dic. de 2011
0 votos
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?
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

