How to combine 4 Matrices into one matrix

8 views (last 30 days)
Ibrahim Al
Ibrahim Al on 20 Feb 2018
Edited: James Tursa on 20 Feb 2018
I have for example 4 matrices build by for loop. I wanna combine or concatenate then into one matrix.

Answers (1)

James Tursa
James Tursa on 20 Feb 2018
Edited: James Tursa on 20 Feb 2018
E.g.,
result = zeros(m,p,n); % assuming your matrices are m x p sized
for k=1:n
result(:,:,k) = the matrix calculation within your loop
end

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!