Question: A vector is given by: x = [1:50] (a) Write a program in a script file that lists all the vectors elements that are divisible

A vector is given by: x = [1:50]

(a) Write a program in a script file that lists all the vectors elements that are divisible by 2 or 4 and displays the new vector.

(b) Write a program in a script file that removes all the vectors elements that are divisible by 2 or 4 and displays the new vector.

please answer in MATLAB code, thank you

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!