Dear community,
I want to define a matirx series whose each element is a matirx. For example,
a1 = randn(2,2);
a2 = randn(2,2);
a3 = randn(2,2);
...
an = randn(2,2);
I want to define
c = [a1, a2, a3, ..., an];
But the operator [] returns a combined matrix.

Respuestas (1)

Arif Hoq
Arif Hoq el 25 de Mzo. de 2022

0 votos

square bracket returns horizontal concatenation of input argument. i guess you can use a cell array
c = {a1,a2,a3};

Categorías

Más información sobre Polynomials en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de Mzo. de 2022

Respondida:

el 25 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by