How to put matrices with different sizes together?

I have 20 matrices with sizes = (No of stocks x 12) for 20 years. In each year, the number of stocks is different that the 20 matrices have different sizes. I need to do the same thing with data of each year. Is there anyway that I can put all matrices together and run loop? (so that I don't have write the same code for each year separately)

 Respuesta aceptada

Geoff Hayes
Geoff Hayes el 15 de Abr. de 2015

0 votos

Ha - consider using a cell array to store the differently sized matrices. Then, you can iterate over each matrix in the cell array and perform whatever operation against each one.

Más respuestas (0)

Categorías

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

Preguntada:

el 14 de Abr. de 2015

Respondida:

el 15 de Abr. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by