How to pass symbolic variables to funcion handle

조회 수: 1 (최근 30일)
David Armendáriz
David Armendáriz 2018년 7월 11일
편집: David Armendáriz 2018년 7월 11일
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개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by