Community Profile

photo

Matt Smith


Last seen: ungefär 3 år ago Active since 2021

Followers: 0   Following: 0

Statistics

  • Thankful Level 1

View badges

Feeds

View by

Question


Modifying odd/even numbers of a column vector
How would I go about modifying the odd and even elements of the following vector ? x = [4 5 7 6 5 8 2 1]; So that when run it ...

ungefär 3 år ago | 2 answers | 0

2

answers

Question


How do I modify my code to work for odd numbers?
So I have this code that check vector x for odd numbers and adds 5 to each of these. x = [4 5 7 6 5 8 2 1]; x=x+mod(x,2)*5; %F...

ungefär 3 år ago | 1 answer | 0

1

answer