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 1n array. This function 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 1n. 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.
In your script, 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 odd integers that are not divisible by 3,5 and 7). 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 in this question.
Please answer in MATLAB code.
 Create a local function at the end of the script named

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!