Defining a symbol to perform a specified operation
1 回表示 (過去 30 日間)
古いコメントを表示
Is there a way, for example, given two numbers a and b I can either use a function or define a symbol, say %, such that a%b = (a*b)/(a+b)?
0 件のコメント
採用された回答
Geoff Hayes
2020 年 4 月 20 日
Aleem - I think the easiest approach would be to create a function. It would take the a and b as inputs, the function body would be your above equation, and the output parameter would be the result. Is there a reason why you want to create a function rather than just writng the above where needed?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!