필터 지우기
필터 지우기

Transpose matrix and then predetermine rows

조회 수: 1 (최근 30일)
Andrew Alkiviades
Andrew Alkiviades 2011년 7월 7일
Hi
I have a data spreadsheet in Excel that consists of 1 column and 8760 rows. This is raw hourly temperature readings over a one year period.
I want to use Matlab to convert the 8760 row x 1 column to a 365 row x 24 hour column.
I have tried to transpose the matrix but I can only get it to give me 1 row and 8760 columns.
How can I get it to change row every 24 readings.
Thanks

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 7월 7일
doc reshape;
Data = reshape(x, [24,365])'; %reshape and then transpose

추가 답변 (1개)

James Tursa
James Tursa 2011년 7월 7일
A = your original column vector;
B = reshape(A,24,365).'

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by