Borrar filtros
Borrar filtros

graphing only portions of data

3 visualizaciones (últimos 30 días)
Joseph
Joseph el 3 de Abr. de 2014
Respondida: Joseph Cheng el 3 de Abr. de 2014
I have 20,000 data points. my objective is to have 4 subplots. each with a different number of data points. subplot 1 has the first 250, subplot 2 has the first 2500, sub plot 3 has first 5000, etc.
I have the code for all the points, struggling to get the different amounts of points per graph. here is my code...
x(1)=0;
y(1)=0;
for k = 1:1:19999
x(k+1) = y(k)*(1+sin(.7*x(k))) - 1.2*sqrt(abs(x(k)));
y(k+1) = .21 - x(k);
end
plot(x,y,'o','markersize',2)
  1 comentario
Joseph
Joseph el 3 de Abr. de 2014
I know I can use extra for loops, but my objective is to do it with just the one

Iniciar sesión para comentar.

Respuesta aceptada

Joseph Cheng
Joseph Cheng el 3 de Abr. de 2014
you don't need any for loops to do this.
subplot(4,1,1),subplot(x(1:250),y(1:250));
subplot(4,1,2),subplot(x(1:2500),y(1:2500));
subplot(4,1,3),subplot(x(1:5000),y(1:5000));
subplot(4,1,4),subplot(x(1:20000),y(1:20000));

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by