How can I perform matrix operations on certain rows?

1 回表示 (過去 30 日間)
Ryan Hickson
Ryan Hickson 2017 年 3 月 30 日
コメント済み: Ryan Hickson 2017 年 3 月 30 日
I have data stored in a large matrix (8 columns of hundreds of thousands of rows), for example:
Year D Val
1980 1 345
1980 2 320
1980 3 364
1981 1 400
1981 2 387
1981 3 209
1982 1 195
1982 2 358
1982 3 322
How can I plot/ save/ perform operations on the rows for certain years?
Many thanks.

回答 (1 件)

zepp
zepp 2017 年 3 月 30 日
What do you mean by 'certain'? Is there any condition that determines the selection of years. Then, you could use a logical array of length (nrows) and then select the years based on this logical array.
  1 件のコメント
Ryan Hickson
Ryan Hickson 2017 年 3 月 30 日
No worries, I found what I was looking for. :)

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

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by