sym, symfun, and function handle

9 ビュー (過去 30 日間)
Hoang Minh Le
Hoang Minh Le 2022 年 12 月 20 日
回答済み: Rohit 2023 年 1 月 11 日
syms y1(x) y2
y1(x) = x^2 % symfun
y2 = x^2 % sym
y3 = @(x) x^2 % function handle
I am on day 1 of learning symbolic toolbox.
My question is about how to use the functions above appropriately.
My understandings so far:
  • Between y1 and y2, I understand that y2 needs sub() to evaluate.
  • (Answered somewhere on the forum) y3 has better excute time for numeric substitution

採用された回答

Rohit
Rohit 2023 年 1 月 11 日
Hello,
In order to better understand the use of these functions, I am sharing the documentation of “sym”, function handles and the documentation link for symbolic Math Toolbox which contain examples to help you get started. Below are the links for the same:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by