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!