vector into matrix form

I want to reshape a vector that has 8761-25 elements in it so when reshaped it is a vector of 364 rows with 24 columns. Im using the function x=reshape(A,365,24) but i get a rejection saying elements in A must be the same. Help please. just so you have some background i am transporting a column from excel, this array is called LOAD. Wnat i ulimately would like to do is once in a vector of 364,24 ill take every row of 24 values and plot them according to the corresponding time of day in a for loop then saved in a folder so i can access these graphs later to share with colleagues.

3 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 20 日
8761x25 =219025
365x24= 8736
How is it possible to reshape 219025 elements to get 8736?
Christopher
Christopher 2013 年 2 月 20 日
i found out what my last number should have been 8760 which will then divide to a perfect 364 rows. Azzi, what is the out=A(....) represent?
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 20 日
A(1:5,4:10) means the sub matrix obtained from A :
line 1 to line 5
and
column 4 to column 10

サインインしてコメントする。

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 20 日

0 投票

Unless you want:
out=A(1:365,1:24)

カテゴリ

ヘルプ センター および File ExchangeNumeric Types についてさらに検索

質問済み:

2013 年 2 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by