Hi, I need help with this MATLAB question please. Ineed the answer ASAP. Note: T
ID: 3797917 • Letter: H
Question
Hi, I need help with this MATLAB question please. Ineed the answer ASAP. Note: This assignment is part of mt BE1500 Class: Into to Programming & Computer Engineering. This is an intro level.
Create a function file that determines the lowest value of five numerical inputs. The function syntax should include an output variable that stores the number that was the lowest value of the 5 inputs. (Submit one function file; be sure to copy and paste command line code that demonstrates results from function calls and testing)
Explanation / Answer
function minimum = min()
num = input('Enter number 1: ');
minimum = num;
num = input('Enter number 2: ');
if minimum > num
minimum = num;
end
num = input('Enter number 3: ');
if minimum > num
minimum = num;
end
num = input('Enter number 4: ');
if minimum > num
minimum = num;
end
num = input('Enter number 5: ');
if minimum > num
minimum = num;
end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.