When writing user defined functions how can i have a function of a variable as an input variable?
이전 댓글 표시
I am trying to write a function for example: function res = MyFunction(x1,x2,x3,f)
where f is a function of x but Matlab doesn't seem to like this. Is there a way around this without previously defining a function?
댓글 수: 2
Steven Lord
2016년 11월 7일
Can you show a little more context, like how you define the variables x1, x2, x3, and f with which you call MyFunction and what exactly "Matlab[sic] doesn't seem to like this" means?
- Does it throw an error, and if so what is the full text of the error message?
- Does it issue a warning, and if so what is the full text of the warning message?
- Does it return a result different than what you expect?
- Does it do something else (and if so, what does it do?)
Jacob Carias
2016년 11월 7일
편집: Jacob Carias
2016년 11월 7일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!