Question: A vector is given by V = [4, 17,-3, 8,-7, 12, 30,-6, 6,-6,-7, 15, 4, 7, 9]. Write an m-file which doubles the elements that

 A vector is given by V = [4, 17,-3, 8,-7, 12,

A vector is given by V = [4, 17,-3, 8,-7, 12, 30,-6, 6,-6,-7, 15, 4, 7, 9]. Write an m-file which doubles the elements that are positive and are divisible by 3 or 5, and, raises to the power of 4 the elements that are negative and greater than -5. If a number does not satisfy either condition, square the value. Store the modified data into a new vector Create a 2x1 subplot (stacked vertically). In the top subplot, plot the raw unaltered data as red squares. In the bottom subplot, plot the altered data as blue circles

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!