필터 지우기
필터 지우기

How can I store, in a specific way, my data within a cell array?

조회 수: 1 (최근 30일)
Romain W
Romain W 2013년 2월 20일
Hi everyone,
Can someone tells me why:
t=1:10000;
b{its,t} = a(t,:);
does not work?
I have a loop like the following:
while (condition)
calculate matrix M;
its = its+1;
end
and I want to have each row of M to be a cell (horizontally) inside the cell array b without using a nested for loop inside my while loop. My code works and I did spend time to vectorize it (increasing the performance so much) but now I cannot store the data which is a bit ... frustrating to say the least.
Can anyone help me out?
Thank you very much for your time.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 20일
Look at this example
A=cell(10,8)
b=num2cell(rand(4,5))
A(1:size(b,1),1:size(b,2))=b

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by