Effacer les filtres
Effacer les filtres

How to concatenate the resulting 2D matrices from a 3D matrix, vertically? Please, I need the solution for a gereric dimension n, i.e., A(:,:,n)

1 vue (au cours des 30 derniers jours)
%example
for a=1:n
for c=1:n
H1(c,a,a)=1;
H1(c,c,a)=-1;
end
end
  1 commentaire
Mariana
Mariana le 23 Nov 2017
With H1(:,:) result and nx(nxn) 2D matrix. This concatenate the 3D matrix horizontally.
But, what about vertically.

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 23 Nov 2017
Hcell=num2cell(H1,[1,2]);
result=vertcat(Hcell{:});

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by