how to plot results ?

4 views (last 30 days)
Aniket
Aniket on 12 Mar 2013
Hello,
I am running for loop and saving results from error to e1{1}.... for each iteration.
but i want to plot the results. how should i do this ? is this correct method of saving results?
*******************************
for p=1:3
for q = 1:50
v = ['w', num2str(q),'(2,end)'];
w(q) = eval(v);
end
sim('with50osc.mdl')
e2{1}=error;
e3{2}=error;
e4{3}=error;
end
****************************************

Accepted Answer

Walter Roberson
Walter Roberson on 12 Mar 2013
  7 Comments
Walter Roberson
Walter Roberson on 12 Mar 2013
colors = {'r', 'g', 'c', 'b'}; %color for traces
for K = 1 : length(e)
plot(e{K}(:,1), e{K}(:,2), colors{K} );
hold on
end
Aniket
Aniket on 12 Mar 2013
Thanks for this its working

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!