Azzera filtri
Azzera filtri

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)

2 visualizzazioni (ultimi 30 giorni)
%example
for a=1:n
for c=1:n
H1(c,a,a)=1;
H1(c,c,a)=-1;
end
end

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by