Question: Problem 1: A MATLAB function file is provided below. For the functions and values entered in the command window given in the next page, determine
Problem 1: A MATLAB function file is provided below. For the functions and values entered in the command window given in the next page, determine the resulting values of 'x_result Show all your work along the way. Here is the function file, named EvaluateResult.m: function x result EvaluateResult(func,v1,v2) % EvaluateResult: finds x result based on v1 and v2 % x-result = EvaluateResult(func-v1.v2): Evaluates func at points v1 and v2. % and then finds the value of x result based on the results. % input: % func= anonymous function % v1-value 1 % v2= value 2 % output % x result, final value res1 = func(v1); res2 = func(v2) res2 = 2.res2; s = 2.res1+res2+1 4; if res1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
