How to pass symbolic variables to funcion handle
조회 수: 1 (최근 30일)
이전 댓글 표시
I have some function handle in console defined like this:
g=@(t1,t2,t3)[t1^2,t2^3,t3^3];
Then, I have some function like this:
function [] = somefunction(g)
s = sym('s',[1,nargin(g)])
g(s)
This gives an error, because the vector t is viewed as only one element and therefore the error
Not enough input arguments.
appears. How con I fix this?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!