How to plot a definite range of values in a for loop?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi guys, I have a file of 8760 values ( 24 hours *365 days) i need to plot only the data from 11am to 3 pm for each day of the year, can someone help me? I think a for loop could be the solution but i cannot compute it.
댓글 수: 0
답변 (1개)
Andrei Bobrov
2017년 10월 17일
Let Y - your data (24 x 365);
plot(Y(12:15,:))
댓글 수: 2
Andrei Bobrov
2017년 10월 18일
for ii = 1:size(A,2)
plot(Y((11+24.*(ii-1)):(16+24.*(ii-1)));
if ii == 1
hold on;
end
end
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!