Create a plot for a loop
1 view (last 30 days)
Show older comments
Commented: Miguel Albuquerque on 24 May 2022
Hey guys, thanks in advance for reading this
I have this code, that finds in surv_matrix the indixes where the matrix is different from zero. but for each one of them indices, I want to create a plot, like that, and see one plot for each indice. Is there anyway of creating a better loop, since this one only gives me the last plot. Imagining that ic=3,4,5. I want to see 3 plots, and with this code I m only seeing 1.
Mustafa Abu-Mallouh on 24 May 2022
Edited: Mustafa Abu-Mallouh on 24 May 2022
Use the 'hold on' command after your plot command, this will put all of your plots on the same axes
Find more on Loops and Conditional Statements 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!