Even Numbers in a matrix a
15 次查看(过去 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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!