Community Profile

photo

Matt Smith


Last seen: etwa 3 Jahre vor Aktiv seit 2021

Followers: 0   Following: 0

Statistiken

  • Thankful Level 1

Abzeichen anzeigen

Feeds

Anzeigen nach

Frage


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 ...

etwa 3 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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...

etwa 3 Jahre vor | 1 Antwort | 0

1

Antwort