function as arguement in matlab

1 vue (au cours des 30 derniers jours)
nguyễn gia bảo
nguyễn gia bảo le 16 Avr 2019
Commenté : Stephen23 le 16 Avr 2019
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
  1 commentaire
Stephen23
Stephen23 le 16 Avr 2019
Read about feval.

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 16 Avr 2019
function c = test(fun,a,b)
c = fun(a,b)
Call
a = rand ;
b = rand ;
c = test(@tan2d,a,b)

Catégories

En savoir plus sur Spline Postprocessing dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by