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!