Question: The code for a MATLAB function is provided below. if input1 = 10 and input2 = 1, what will be the final value of
The code for a MATLAB function is provided below. if input1 = 10 and input2 = 1, what will be the final value of w2 just before the function ends and returns the ouput values? function [cost,steps] = WhileFunction(input1,input2) w1 = input1; w2 = input2; steps = 0; while(w1w2) w1w1-1; w2 = w2+2; steps = steps+1; if w24 break end end cost input1*input2;
Step by Step Solution
3.39 Rating (149 Votes )
There are 3 Steps involved in it
Answer Given the provided MATLAB function if input1 10 and inpu... View full answer
Get step-by-step solutions from verified subject matter experts
