how can i solve this matlab
Show older comments
how can i solve this ? Using "for" loop with "if" statement generate two vectors "A" and "B" from vector C = [1:100] where vector A has the odd numbers of the vector B has the even number of vector C
3 Comments
John D'Errico
on 30 Nov 2020
That you need a full answer is not relevant. You need to do your own homework.
Bashar Fayiz
on 30 Nov 2020
Answers (1)
David Hill
on 30 Nov 2020
Look at mod() function
C(mod(C,2)==1)
1 Comment
Bashar Fayiz
on 30 Nov 2020
Categories
Find more on MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!