How to Reshape matrix.

3 次查看(过去 30 天)
Hello,
Say i have a 1x365 matrix. How would i create a matrix of 24x365 where the data from the initial matrix column (1x365) would be propagated down the entire column in the second matrix (24x365).
cheers
  2 个评论
Thomas
Thomas 2012-9-18
A 1x365 array has 365 elements, how could you reshape it to 24X365 matrix of 8760 elements? reshape needs the two matrices to have the same number of elements. Do you intend to pad you matrix with zeros?
Azzi Abdelmalek
Azzi Abdelmalek 2012-9-18
It's not reshaping. what you need is replicate your vector,

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2012-9-18
编辑:Walter Roberson 2012-9-18
repmat(YourMatrix, 24, 1)
  1 个评论
Gareth Evans
Gareth Evans 2012-9-18
Thats the one. Ive used repmat before, just a little rusty. Thankyou...(-:

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by