Shaibal Ahmed
Shaibal Ahmed

Reputation: 189

Create matrix from a column vector in MATLAB

I have a column vector with 19176 values. I want to create a matrix with 136 values in each row so I can have a 141*136 matrix (19176/136 = 141). The matrix should take the first 136 values for the first row and the next 136 values for the second row etc.

Upvotes: 0

Views: 213

Answers (1)

Ander Biguri
Ander Biguri

Reputation: 35525

You want to reshape the column vector?

out=reshape(in,136,141).'

Upvotes: 1

Related Questions