Answered step by step
Verified Expert Solution
Question
1 Approved Answer
function y1 funes (x) y = 0.5*exp (x/3)-x.^2.*sin(x) end function y2 = fun lg (x) WWWAAvon y = sin(x). *log (1+x) -x.^2 end Using fun_es
function y1 funes (x) y = 0.5*exp (x/3)-x.^2.*sin(x) end function y2 = fun lg (x) WWWAAvon y = sin(x). *log (1+x) -x.^2 end Using fun_es and fun_lg, now create a function f_es (x) that: - ask the name of the function to be evaluated - allow the user to type the name of the function - evaluate the function with feval and return the functional values and - stop if the function indicated by the user is neither fun_es nor fun_lg. Test your f_es by calculating fun_ (3) and fun_lg (3)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started