Even Numbers in a matrix a
10 ビュー (過去 30 日間)
古いコメントを表示
I have a matrix 1 through 20 and i need to make a new matrix b with even numbers 1 through 20
0 件のコメント
回答 (1 件)
madhan ravi
2018 年 10 月 31 日
編集済み: madhan ravi
2018 年 10 月 31 日
a=1:20
b=a(rem(a,2)==0)
5 件のコメント
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
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!