Question: Create a function named primeNumCheck that takes in one ( 1 ) input, and returns one ( 1 ) output of a boolean value (

Create a function named "primeNumCheck" that takes in one (1) input, and returns one (1) output of a boolean value (true or false) that represents whether or not the number is prime. Take the following into consideration:
a. DO NOT use the built-in "isprime" MATLAB function; this assignment is to help your problem-solving and MATLAB skills.
(If "isprime" is used, no points given for this question.)
b. A number needs to meet the following criteria to be considered prime:
i. The number is non-negative and is not 0 or 1
ii. The number is an integer
iii. The number can only be divisible (have a remainder of 0) by 1 and itself
c. You can assume the following:
i. The input is ahrays a number.
ii. There is only 1 input (no arrays involved)
Hint: Look into the "modulo" and "remainder" functions...
 Create a function named "primeNumCheck" that takes in one (1) input,

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!