Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

transforming cells to some matrics in loops

1 vue (au cours des 30 derniers jours)
som
som le 1 Fév 2012
Clôturé : MATLAB Answer Bot le 20 Août 2021
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,

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by