Question: Assign the vector (2, 8, 3, 7, 4, 1, 9) to an object. Using one single command, find the elements of the vector that are
Assign the vector (2, 8, 3, 7, 4, 1, 9) to an object. Using one single command, find the elements of the vector that are even or greater than 7, multiply those elements by 1 and use them to replace the original elements. Print out the new vector. (Hint: You may find the %% operator useful. Explore it using the command ?"%%".)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
