Question: USE MATLAB! USE MATLAB! QUESTION 2a: For an 1 x n array, write a function evenandodd that separates the odd and even integers into 2
USE MATLAB!

USE MATLAB!
QUESTION 2a: For an 1 x n array, write a function evenandodd that separates the odd and even integers into 2 arrays (i.e. the function will output 2 arrays, 1 consists of all the even integers, and the other one consists of all the odd integers). The evenandodd function can take any arrays of dimension 1x n. Provide a proper comment section in your function. Note: any conditional statements (if-else statement, for and while loops) are NOT allowed to use for this question. (Submit only the m-file for this question) QUESTION 2b: In another script file, generate an array of 25 random integers in the range from 10 to 100. Determine all the odd integers generated in the array, then determine the number of prime numbers in those odd integers. (Remember prime numbers are numbers that have no positive divisors other than 1 and itself). You should use the evenandodd function created in part a) to solve this question. Note: any conditional statements (if-else statement, for and while loops) are NOT allowed to use for this question. (Submit the pdf file of the html report for this question)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
