Work with Cell Arrays

I am trying to get an average time series from a cell array (e.g., "ang_dispn")
Each cell contains a times series of data.
ang_cond1=ang_dispn(:,1);
ang_cond2=ang_dispn(:,2);
ang_cond3=ang_dispn(:,3);
Each of these codes makes a cell array (100 by 1)
I want to put the files in the matrix so I can calculate the average of the first index,2nd index, 3rd index with each array from the cell of arrays, and so forth to get one times series for "ang_cond1". I DO not want to calculate the average of each time series with cellfun(@mean, ang_cond1). I want a cummulative average not a times series containin averages, because the cell contains different size arrays I have been trying to use "padadd" or "padcat" functions but it seems not to help. Any suggestions
for k=1:10
ang_cond_sub_(k)=padadd(cell2mat(ang_cond1{k,1}),cell2mat(ang_cond1{k+1,1}));
end;

2 comentarios

Jing
Jing el 29 de En. de 2013
Do you mean 'accumulative average' by 'a cummulative average'? What is that? Is it the average of the whole time series? If so, padding some number to the time series is not a good idea.
Jan
Jan el 29 de En. de 2013
"It seems not to help" does not allow us to draw conclusions about the nature of the problem. In the sentence "put the files in the matrix", what are the "files" and what is "the matrix"?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.

Preguntada:

el 29 de En. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by