Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started