Hi Folks,
I have a 1*12 cell array which contains twelve 1*1 struct arrays. Each of which subsequently contains a matrix and it is in the form
Test{1,i}.data
I am struggling to implement the above line in a for loop. Here it is
for i=1:5
Work(i)=Constant.*Test{1,i}.data.*Increment;
end
I get error stating "In an assignment A(I) = B, the number of elements in B and I must be the same." Any ideas?
Thanks in advance B

댓글 수: 1

ES
ES 2013년 10월 18일
편집: ES 2013년 10월 18일
What is 'Work'?

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

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 10월 18일

0 개 추천

Use Work{i} instead of Work(i)

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2013년 10월 18일

0 개 추천

for ii = 1:5, Work{ii}=Constant.*Test{1,ii}.data.*Increment; end

카테고리

도움말 센터File Exchange에서 Performance and Memory에 대해 자세히 알아보기

태그

질문:

2013년 10월 18일

댓글:

2013년 10월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by