• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Simple matlab programming question

MisterPants

Senior member
I'm trying to change the color of plot lines with the index of a for loop. I have a long if list that like this:
elseif(jm==6)
ls='b';

but I get an error on:
plot(t,y(1,🙂,'ls-');

whereas I get a blue line from
plot(t,y(1,🙂,'b-');

How do I fix it?
 
Back
Top