using matlab please include testing write a script that uses an anonymous function t 5155751

Using Matlab. Please  include testing.

Write a script that uses an anonymous function to represent the function f(1) = 223 – 4x + 2 The anonymous function should be

Write a script that uses an anonymous function to represent the function f(1) = 223 – 4x + 2 The anonymous function should be able to deal with array inputs. The function should operate elementwise on array inputs and return an output array of the same size as the input array. An example showing the expected output using f(x) as defined above and input in Val = [1,2,3] is shown below. Use the following variable names: • f – The anonymous function handle. • in Val – The input array (you can test your code using in Val = [1, 2, 3]). Your code should display: • The output of the anonymous function. Requirements: • Maximum of 7 code statements. • Do not use a for-loop. You do not need one for this task. Hints & tips: • You can display the output by leaving off the semi-colon or by using the disp or fprintf functions. If you use fprintf make sure you display the output to 4 decimal places. • The anonymous function should operate element-wise on array inputs and return an output array of the same size as the input array. For example: Test Result inval = [1, 2, 3] 0 10 44

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now