Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can I match my subscripted assignment dimensions?
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm trying to retrieve multiple securities from Yahoo! by using a loop then storing the results in a matrix. However, I keep encountering the error, "Subscripted assignment dimension mismatch." How can I fix this?
Here is my script:
c = yahoo;
ticker = {'GOOG' 'IBM' 'TWTR'};
fromdate = { 735766, 735767, 735783};
todate = { 735783,735783,735783};
for i = 1:3
Price.(ticker{i}) = fetch (c,ticker(i),'Adj Close',fromdate{i},todate{i});
temp = Price.(ticker{i});
ClosePrice(:,i) = temp (:,2);
end
EDU>> extwo
Subscripted assignment dimension mismatch.
Error in extwo (line 10)
ClosePrice(:,i) = temp (:,2);
Any help would be great! Thanks,
Matt
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!