Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

transforming cells to some matrics in loops

1 visualización (últimos 30 días)
som
som el 1 de Feb. de 2012
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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,

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by