Filter löschen
Filter löschen

How to concatenate using for loop?

11 Ansichten (letzte 30 Tage)
azarang asadi
azarang asadi am 24 Okt. 2021
Bearbeitet: Paul am 24 Okt. 2021
Hi,
I'm running a for loop and on every iteration I get a matrix that has 231 columns but different number of rows. I need to concatenate my results vertically and save them to a m by 231 matrix that is concatenated of all for loop results. How can I do that?

Antworten (1)

Paul
Paul am 24 Okt. 2021
Bearbeitet: Paul am 24 Okt. 2021
Preallocate an empty matrix with 231 columns and then use
doc vertcat
each time through the loop

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by