Question: This is for MATLAB (a) (12 points) The simplified exponential function is defined as following. Write a UDF function, name it simpleE, that has one
(a) (12 points) The simplified exponential function is defined as following. Write a UDF function, name it "simpleE", that has one input and one output. f(x) = 1 + x + x2 x + 21 3! x5 + + 4! 5! + 6! (b) (5 points) Test your UDF function "simpleE" from (a) for x = 0.65, call it simple = f(0.65). (c) (8 points) Use Matlab built-in function to calculate the exponential value: fexact = 0.65 and compute the absolute difference between file and fexact (hint: you can use Matlab function "abs" to compute the absolute difference)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
