The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: changing color plot in a looped figure plotting
Replies: 5   Last Post: Nov 29, 2012 7:54 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Gael crevoise

Posts: 3
Registered: 11/23/12
changing color plot in a looped figure plotting
Posted: Nov 23, 2012 5:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I have a question about plotting while looping to get information from an excel file

I have the following script:
for i=3:6:225
x=xlsread('test.xlsx','Sheet1',['B' int2str(i) ':JB' int2str(i)]);
y=xlsread('test.xlsx','Sheet1',['B' int2str(i+1) ':JB' int2str(i+1)]');
hold on
hold off

I wish to have different color for different part of the plot. For example, it could be great that all data from 3,21,39....are plotted in green, while the one 9,27,45.... are in blue, and the data 15,33,51....are plotted in red.

Is it possible to make such a things?
Thanks a lot for your help

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.