Hello,
I've inputted data from an excel file (defined here as B), and would like to generate two separate plots — one where the value in column 7 is <25, and a second where the value in column 7 is >= 25.
So far, the code is:
s = B(1:18,7);for x = B(1:18,5) for y = B(1:18,12); for i=1:length(B(1:18,7)); if s(i)<25; figure(1); subplot(3,1,1); scatter(x,y); grid on; hold on elseif s(i)>=25; figure(2); subplot(3,1,1); scatter(x,y); grid on; hold on end end endend
The plots are identical, and it appears that the code is checking that the value in column is < or >= 25, and then plotting all of (x,y). How do I limit it so it only plots (x,y) under those conditions separately?
Any advice or suggestions are appreciated.
Cheers
Best Answer