How can I copy all elements, which > 4 to vector V?

1 回表示 (過去 30 日間)
Ihor
Ihor 2023 年 1 月 17 日
回答済み: Abhinav 2023 年 1 月 17 日
I have a M = magic(5) matrix. How can I copy all elements, which > 4 to vector V?

採用された回答

Abhinav
Abhinav 2023 年 1 月 17 日
M = magic(5);
V=M(M>4)

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by