graphing only portions of data
2 次查看(过去 30 天)
显示 更早的评论
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)
采纳的回答
Joseph Cheng
2014-4-3
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));
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!