Function Calls Given the following functions lest1 and test2
Function Calls Given the following functions lest1 and test2, determine whether the function calls below are correct or not. If they are correct, indicate the value of the variable out. If they are in error, specify what is wrong with them. You must \"desk-check\' your answers and write them out below by hand. You should not use MATLAB for this problem, unless it is to check your hand work after you\'ve finished.
Solution
a. out = test1(); //This function should have 2 parameters as input. As no parameters are passed, it leads to error.
b. out = test1(6); //The same problem as specified in problem 1.
c. out = test1(3, 4); //This works fine, and the output is: sqrt(32 + 42) = sqrt(25) = 5.
d. out = test2(12); //This works fine, as the number of parameters is not 2, the value of x i.e., 12 is assigned to out.
e. out = test2(6, 8); //This works fine, as the number of parameters is 2, the output is: sqrt(62 + 82) = sqrt(100) = 10.
f. out = test2(8, 10, 12); //This function is expecting atmost 2 parameters, and therefore, it leads to error.
