Question: please use matlab to solve this problem Hand in your MATLAB program and output. Problem 5: Write a function that finds all the prime numbers

please use matlab to solve this problemplease use matlab to solve this problem Hand in your MATLAB program

Hand in your MATLAB program and output. Problem 5: Write a function that finds all the prime numbers between two numbers m and n. Name the function pr-prime (m, n),where the input arguments m and n are positive integers, and the output argument pr is a vector with the prime numbers. If m > n is entered when the function is called, the error message "The value of n must be larger than the value of m." is displayed. If a negative number or a number that is not an integer is entered when the function is called, the error message "The input argument must be a positive integer." is displayed. Use the function with: (a) prime (12,80) (b) prime (21,635) (c) prime (100,200) (d)prime (90,50) Hand in your MATLAB program and output

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!