MATLAB Answers

could anyone help me how to vertically concatenate different mat files of same number of rows with different columns.

1 view (last 30 days)
jaah navi
jaah navi on 10 Mar 2020
Answered: jaah navi on 10 Mar 2020
A.mat=(10x2)
B.mat=(10x4)
C.mat=(10x6)
i want to vertically concatenate all three .mat files into single final.mat that contains 30 rows with its respective columns.
could anyone please help me on it.

  1 Comment

Jakob B. Nielsen
Jakob B. Nielsen on 10 Mar 2020
You can't concatenate arrays of different dimensions. Why do you need them concatenated? One approach is to add 0s to A and B to make them all 10x6 and then concatenate, but depending on what you intend to do with the data afterwards that might not be a good approach.

Sign in to comment.

Answers (1)

jaah navi
jaah navi on 10 Mar 2020
the reason i need to concatenate all into a single mat file i need to feed the mat file into the neural network for training.

  0 Comments

Sign in to comment.

Sign in to answer this question.