How to change the parameters of a loop

조회 수: 4(최근 30일)
Hinde essmahi BOUZIANE
Hinde essmahi BOUZIANE 2019년 7월 1일
댓글: Hinde essmahi BOUZIANE 2019년 7월 2일
I have an array of 85 doubles and i want to browse the array 9 by 9 (ie: for i=1:9).I want to plot then the results in a figure (3*3).
for j=1:9
%Start and Debut are the arrays that contains the 85 doubles each
But the problem is I just can plot the first 9 elements.How can I change each time to see the others elements?
  댓글 수: 2
Hinde essmahi BOUZIANE
Hinde essmahi BOUZIANE 2019년 7월 2일
The size of the array might change depending on the DATA I have.So I could have some left overs when i split the elements of the array.
The problem is when I want to browse for example the 10th element (j=10), the command plot(3,3,j) wouldn(t work because the maximal value that j can take in this case is 9.
NB: the output is 9 curves

댓글을 달려면 로그인하십시오.


gonzalo Mier
gonzalo Mier 2019년 7월 1일
for i=1:9
A(((i-1):i)*9+1) = instructions(i)


Community Treasure Hunt

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

Start Hunting!

Translated by