Question: THIS IS FOR Matlab program, not other programs Add an additional input argument to the input parameter list (call it user_sel_in) that will allow a

THIS IS FOR Matlab program, not other programs
Add an additional input argument to the input parameter list (call it user_sel_in) that will allow a user to enter an operation type (addition, subtraction for example). This will always be a numeric argument. If the user enters a 1, they mean to add, if the user enters a 2, they mean to subtract. Add an additional output argument to the output parameter list (call it user_sel out) that will allow you to return an argument to the user, representing what they chose to do. Your function should simply return whatever the user entered as the parameter value for user_sel in. In the function body, you should do the following: Add up the values of the first two parameters that the user typed in val1 and val2. You should return the answer to adding up val1 and val2 in the output argument result, and you should return whatever they entered for user_sel_in in the output argument user_sel out
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
