Borrar filtros
Borrar filtros

how to plot results ?

1 visualización (últimos 30 días)
Aniket
Aniket el 12 de Mzo. de 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
****************************************

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Mzo. de 2013
  7 comentarios
Walter Roberson
Walter Roberson el 12 de Mzo. de 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 el 12 de Mzo. de 2013
Thanks for this its working

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by