필터 지우기
필터 지우기

How to Reshape matrix.

조회 수: 3 (최근 30일)
Gareth Evans
Gareth Evans 2012년 9월 18일
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