function as arguement in matlab

1 回表示 (過去 30 日間)
nguyễn gia bảo
nguyễn gia bảo 2019 年 4 月 16 日
コメント済み: Stephen23 2019 年 4 月 16 日
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 件のコメント
Stephen23
Stephen23 2019 年 4 月 16 日
Read about feval.

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2019 年 4 月 16 日
function c = test(fun,a,b)
c = fun(a,b)
Call
a = rand ;
b = rand ;
c = test(@tan2d,a,b)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by