Borrar filtros
Borrar filtros

Info

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

How to calculate the mean values in this case?

1 visualización (últimos 30 días)
Leon
Leon el 14 de Mzo. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have two matrices: both of them have sizes of 200x100x50. The third elements (50) are time. In Matrix One, the time starts from Time1 to Time2, and in Matrix Two, the time starts from Time2 to Time3. How do I get the average values of the time chunk from Time1 all the way to Time3?
Instead of creating a loop, is there a more efficient way of getting this done. I have a bunch of such matrix pairs.
Many thanks!

Respuestas (1)

KSSV
KSSV el 14 de Mzo. de 2018
Read about mean it gives you option of specifying the dimension to calculate the mean. If you think you need to arrange your matrix in some order..use reshape. Just using reshape and mean is sufficient. You need not to go for loop.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by