How to create a vector of handle functions?

21 ビュー (過去 30 日間)
holmes idee
holmes idee 2019 年 2 月 1 日
コメント済み: holmes idee 2019 年 2 月 1 日
I recently a had a problem , i wanted to create a vector of handle functions like
functions=[@(t)(t) @(t)(exp(t))]
How cn i do this ?

採用された回答

Steven Lord
Steven Lord 2019 年 2 月 1 日
Store your function handles in a cell array.
f = {@(t) t, @(t) exp(t), @exp} % the second and third are equivalent
valueOfSecondFunction = f{2}(0:2)
  1 件のコメント
holmes idee
holmes idee 2019 年 2 月 1 日
Thank you , it really helping me

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunction Handles についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by