Answered step by step
Verified Expert Solution
Link Copied!

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 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

Are social networks already being used in the company?

Answered: 1 week ago

Question

LO10.3 Explain how demand is seen by a purely competitive seller.

Answered: 1 week ago