Question: Answer parts a and b. DO NOT USE while or for loops, reshape, randperm, or fprintf. ONLY USE if statements, vectors, matrices, functions, or sprintf.

 Answer parts a and b. DO NOT USE while or for

loops, reshape, randperm, or fprintf. ONLY USE if statements, vectors, matrices, functions,

Answer parts a and b. DO NOT USE while or for loops, reshape, randperm, or fprintf. ONLY USE if statements, vectors, matrices, functions, or sprintf.

(Primes) As you should know, a prime number is any whole number greater than 1 that is divisible by only itself and 1. For this problem, you will be considering only numbers that are less than 10, and so you may simply enumerate the primes. is_prime_lt_10 Function: Input variables: a scalar integer between 1 and 10 Output variables: a string that says whether the given number is prime; the string should be of the form . XX is prime or XX is not prime where XX is the given number A possible sample case is: >> prime = is_prime_lt_10(2) prime = 2 is prime (Quadrants) Given an angle in radians that is in the interval [0, 27), we will say that it is in the first quadrant if it is in the interval (0, ), the second quadrant if it is in the interval [6,7), the third quadrant if it is in the interval [T, **), and the fourth quadrant if it is in the interval [37, 27). which_quadrant Function: Input variables: a scalar representing an angle in radians in the interval [0, 27) Output variables: a string which contains XX is in the first quadrant or XX is in the second quadrant or XX is in the third quadrant or XX is in the fourth quadrant where XX is the floating-point representation of the angle A possible sample case is: >> quadrant = which_quadrant (pi/4) quadrant 0.785398 is in the first quadrant

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!