function as arguement in matlab

Hi evyryone, can anybody please explain how should i do this question, i have no idea what it means: write a function that takes as an arguement another function name or handle and a value of a of x and returns the derivative evaluated at x = a
thanks, i really appreciate your help

Answers (1)

function c = test(fun,a,b)
c = fun(a,b)
Call
a = rand ;
b = rand ;
c = test(@tan2d,a,b)

Products

Release

R2018b

Asked:

on 16 Apr 2019

Commented:

on 16 Apr 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!