Question: Create a local function at the end of the script named evenandodd that receives an 1 n array. This function separates the odd and even
Create a local function at the end of the script named "evenandodd" that receives an array. This function separates the odd and even integers into arrays ie the function will output arrays, 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 Provide a proper comment section in your function. Note: any conditional statements ifelse statement, for and while loops are NOT allowed to use for this question.
In your script, generate an array of random integers in the range from to Determine all the odd integers generated in the array, then determine the number of odd integers that are not divisible by and You should use the "evenandodd" function created in part a to solve this question. Note: any conditional statements ifelse statement, for and while loops are NOT allowed in this question.
Please answer in MATLAB code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
