Question: Matlab Problem (3): Write a program that (a) generates a vector with 20 random integer elements with integers between 10 and 30., (b) replaces all
Matlab
Problem (3): Write a program that (a) generates a vector with 20 random integer elements with integers between 10 and 30., (b) replaces all the elements that are not even integers with random integers between 10 and 30, and (c) repeat (b) until all the elements are even integers. The program should also count how many times (b) is repeated before all the elements are even integers. Whern done, the program displays the vector and a statement that states how many iterations were needed for generating the vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
