How to change plotyn plot curve lines to stairs line
Mostrar comentarios más antiguos
I have 5 curve line, I have got them using plotyn.(see attached plot) I need to change the 5 line curves to stairs type line. How I can do it?
Thanks!
1 comentario
manoharb
el 18 de Mzo. de 2016
Please attach working m. file of plotyn
Respuesta aceptada
Más respuestas (1)
Star Strider
el 4 de Mzo. de 2016
1 voto
Consider using the interp1 function with the 'nearest' method on your data, then plot the result produced by interp1 as a function of the interpolation vector you used. Experiment with it to get the result you want. It should give you the ‘stairs’ effect.
Otherwise, you would have to hack into the code for the plotyn version you are using, and substitute stairs for plot. I don’t suggest modifying someone else’s code unless you thoroughly understand how it works.
1 comentario
davit petraasya
el 4 de Mzo. de 2016
Categorías
Más información sobre Language Fundamentals 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!