Question: Let x = [ 3 1 6 9 1 2 - 1 0 - 1 2 9 6 1 ] . Provide the command (

Let x =[316912-10-12961]. Provide the command(s) that will:
set values that are multiples of 3 to 3(make use of rem - for instance a number n is a multiple of 5 if rem(n,5) equals to 0);
extract the values of x that are greater than 10 into a vector called y;
set the values in x that are less than the mean to 0;
set the values in x that are above the mean to their difference from the mean.
Write your code is such a way that it works for any vector x.

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 Programming Questions!