フィルターのクリア

Even Numbers in a matrix a

12 ビュー (過去 30 日間)
Nicholas Cappellino
Nicholas Cappellino 2018 年 10 月 31 日
コメント済み: Jonas Campos 2021 年 5 月 27 日
I have a matrix 1 through 20 and i need to make a new matrix b with even numbers 1 through 20

回答 (1 件)

madhan ravi
madhan ravi 2018 年 10 月 31 日
編集済み: madhan ravi 2018 年 10 月 31 日
a=1:20
b=a(rem(a,2)==0)
  5 件のコメント
madhan ravi
madhan ravi 2018 年 10 月 31 日
If you got the answer to your question make sure to accept the answer so people know question is solved else let know
Jonas Campos
Jonas Campos 2021 年 5 月 27 日
This answer works

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by