Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Why do I get a 6x30 matrix instead than a 1031x30
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I run this code and I got as a result a 6x30 matrix instead than a 1031x30.
Total weeks is long 1052 cells, startweek is 8. orderweeks is 6 cells long, and the result shows only the last 6 rows of the whole period.
for k = startweek:totalweeks-p1-p2-1
start1 = k;
stop1 = start1+p1-1;
orderweeks = start1:stop1;
start2 = stop1+2;
stop2 = start2+p2-1;
holdweeks = start2:stop2;
nstocks = nbrstocks(k);
% order R for the ordering weeks
data1 = stockdata(orderweeks, 1:nstocks);
I am not sure I made myself very clear.... Thanks anyway
PP.
댓글 수: 1
Walter Roberson
2014년 2월 23일
Where is the end of your "for" loop?
As you are in a "for" loop, which variable are you saving results into that is not overwritten by the next iteration of the loop ?
답변 (1개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!