How to split a vector into 2 vectors, that one holds the evens and one hold the odds
21 views (last 30 days)
Show older comments
I have this vector
0.0492
1.0000
0.9508
1.0000
1.0410
-0.0000
-0.0410
-0.0000
and I want to split it into
X = [0.0492 , 0.9508 , 1.0410 , -0.0410]
Y = [1, 1, 0 , 0]
thanks you
Kpyr
1 Comment
HWIK
on 27 Nov 2021
How do you want to split them between even and odd if most of them are not integers? According to the last digit?
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!