How can I merge multiple matrix in different size
9 views (last 30 days)
BobH on 3 Mar 2020
To merge the matrices and end with that size, they all must have the same number of rows.
You haven't suggested what value should be put into the padding rows, but if you can accept 0, simply assigning a value to subscript (8652,end) will auto-fill all intermediate rows with zero
T_2015(8652,end) = 0;
and so on for the other three. From there you can horzcat all five matrices.
T_five = horzcat( T_2015, T_2016, T_2017, T_2018, T_2019 );