Question: Please write out the algorithm steps! Prob 1. 30pts Develop an algorithm that accepts a numerical vector X as input and outputs second smallest number.
Please write out the algorithm steps!

Prob 1. 30pts Develop an algorithm that accepts a numerical vector X as input and outputs second smallest number. You are only allowed to use the Matlab built-in function length() to determine the length of the vector. Memory trace your algorithm using the following two vectors: (29 25 -12 29-17 4 13] and [6.29 8.12 -7.46 8.27 2.65 -8.05 -4.43 0.94]. Prob 2. 30pts Develop an algorithm that accepts a positive integer number as input and determine whether this number is prime. Output an appropriate message depending on the outcome. You are allowed to use the built-in function rem() that calculate a remainder. Memory trace your algorithm with 11 and 25 separately
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
