フィルターのクリア

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