Azzera filtri
Azzera filtri

how to plot results ?

1 visualizzazione (ultimi 30 giorni)
Aniket
Aniket il 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
****************************************

Risposta accettata

Walter Roberson
Walter Roberson il 12 Mar 2013
  7 Commenti
Walter Roberson
Walter Roberson il 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 il 12 Mar 2013
Thanks for this its working

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by