Question: Matlab Function Name: kraken Inputs: 1. (double) A number representing the upper limit of primes to output Outputs: 1. (double) A 1xN vector containing all
Matlab Function Name: kraken Inputs: 1. (double) A number representing the upper limit of primes to output Outputs: 1. (double) A 1xN vector containing all prime numbers less than or equal to the upper limit number Banned Functions built-in prime function Background: primes, isprime, nextprime, prevprime, nthprime, factor or any other You are planning a journey across Prime Sea, where only creatures with a prime number of tentacles can live. Terrified of many-limbed monsters, you do some research and find out the greatest number of tentacles ever observed on a creature in Prime Sea. However, this gets you hinking about all the other smaller, but just as scary, monsters out there. You decide to use MATLAB to help you find all the other possible tentade counts of creatures in Prime Sea Function Description: up to and including n. Remember that a prime number only has two factors: 1 and itself. Example: Write a function that takes in a prime number, n, and outputs a vector of prime numbers tentacles kraken(7) tentacles-(2 35 7 Notes: All inputs will be 2 or greater 1 is not a prime number The mod () function will be helpful to check for divisibility
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
