How to nest functions?
古いコメントを表示
Hello, I have a function. Then I want to create another function and use the value of the first function to compute the second one. How can I "connect" these functions?
Regards, Sergey
2 件のコメント
I'm unclear what you want to do exactly. Functions can call each other:
F = @(X)(X + 2)
G = @(X)(2*F(X) + F(4))
G(F(2))
Are all valid.
Sergey Dukman
2016 年 1 月 14 日
編集済み: Walter Roberson
2016 年 1 月 14 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!