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
Get step-by-step solutions from verified subject matter experts
