What is the difference between working with matrix and array?

1 回表示 (過去 30 日間)
alpedhuez
alpedhuez 2022 年 7 月 15 日
コメント済み: alpedhuez 2022 年 7 月 15 日
I have a data where the first dimension is month, the second dimension is city, and the third dimension is a vector of temperature of the city in that month. it is 12 (months) * 10 (cities) * 30 (temperature). Is it easier to work with a 120*30 matrix or with a 12*10*30 array?
  7 件のコメント
Steven Lord
Steven Lord 2022 年 7 月 15 日
FYI your usage of * as a separate between dimension sizes usually takes me take a second to interpret. If you say your matrix is size 120*30 does that mean that size returns [120 30] or does it mean you called something like zeros(120*30) to preallocate it?
I'd advise using either "size [120 30]", "120-by-30", or "120 x 30". Or you could copy and paste from the Command Window display, which uses × instead of either * or x.
@dpb, if the plan is to analyze the data based on time and/or days, storing it as a timetable may be useful.
alpedhuez
alpedhuez 2022 年 7 月 15 日
Thank you for all the comments.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by