How to plot a definite range of values in a for loop?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Andrei Bobrov
am 17 Okt. 2017
Let Y - your data (24 x 365);
plot(Y(12:15,:))
2 Kommentare
Andrei Bobrov
am 18 Okt. 2017
for ii = 1:size(A,2)
plot(Y((11+24.*(ii-1)):(16+24.*(ii-1)));
if ii == 1
hold on;
end
end
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!