Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write function m-files such that in MATLAB 2. myfunctionsum (f,m, d) which takes

ID: 3145392 • Letter: W

Question

Write function m-files such that

in MATLAB

2. myfunctionsum (f,m, d) which takes three inputs: [50 pts ) f: A function handle. m: A real number. d: A real number. Does: Calculates the sum mf(m) + (mt d) fm + d) + (m-4 2d)S(m+ 2d).. + (m +49d) f(m + 49d). Returns: This sum. 3. myfunctioncheck (f, a,d, M) which takes four inputs; 50 pts) f: A function handle. a: A real number. d: A real number. M: A real number. Note: You may assume that f(a) M. Returns: The first r-value checked satisfying f(a) > M.

Explanation / Answer

Create a function in a program file named "myfunction.m"

end

To create a handle for a function, precede the function name with an @ sign. For example, if you have a function called myfunction, create a handle named f as follows:

f= @myfunction;

now Create a handle and call the function to compute the function expression.

f= @myfunction;

now execute the loop by creating another function which takes three inputs for calculating sum using

function z = myfunctionsum(f,m,d) % we will get input m,d

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote