Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

transforming cells to some matrics in loops

조회 수: 1 (최근 30일)
som
som 2012년 2월 1일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi all
I've written a program like below. it has a cellular variable named " tsd_total {n,ss} (ii,rr) ".
as you see this variable is inside some loops. I want to define a new variable like " obj_func " which is located after the third loop and its role is to transform " tsd_total {n,ss} (ii,rr) " into matrix form. I want also define a counter for " obj_func " which changes its value for each ' t ' as well as 'y'.
How can I do this? where should be the exact place of " obj_func " ?
clc; clear;
T=3;
Y=10;
M=Y;
n=1;
y=1;
while n<100
for t=T:-1:1
for ss=1:ns
for ii=1:M
for rr=1:nr
tsd_total{n,ss}(ii,rr)=tsd{t,ss}(ii,rr);
end
end
end
n=n+1;
obj_func{y}(t)=cell2mat(tsd_total(t,1:ns)); % <== REFFERS TO MY QUESTION.
end
y=y+1;
end
Can you guide me clearly.
thanks,

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by