Error using symengine First argument must not contain functionals.
조회 수: 10 (최근 30일)
이전 댓글 표시
Dear MathWorks-Community,
I recived the following error message:
Error using symengine
First argument must not contain functionals.
Error in mupadengine/evalin_internal
Error in mupadengine/fevalHelper
Error in mupadengine/feval_internal
Error in sym/diff (line 107)
R = feval_internal(symengine, 'symobj::diff', S, x, n);
When I wanted to run my code it appeard for line 10 where I am calculating diffL_over_theta1dot. Can someone please explain me why it worked for diffL_over_alpha1 in line 4 but not for line 10?
L is a symfun.
Can anyone help me with resolving this issue?
Thanks a lot in advance!
syms tau_1
syms theta_1(t) alpha_1(t)
alpha_1dot=diff(alpha_1,t);
diffL_over_alpha1dot=diff(L,alpha_1dot);
tau_1==diff(diffL_over_alpha1dot,t)-diff(L,alpha_1);
theta_1dot=diff(theta_1,t);
diffL_over_theta1dot=diff(L,theta_1dot)
0==diff(diffL_over_theta1dot,t)-diff(L,theta_1);
댓글 수: 1
답변 (1개)
Avni Agrawal
2024년 6월 18일
Hi Arti,
I understand that you are facing the error while using symengine. The error message you sre encountering, Error using symengine with the detail that "First argument must not contain functionals," typically arises when the symbolic engine encounters an expression or operation that it cannot process due to the nature of the input arguments. In your case, the error occurs when trying to differentiate a symbolic function, L, with respect to the derivative of another symbolic function, theta_1dot, which is derived from theta_1(t).
Confirm that L is defined as a symbolic function that explicitly includes the variables you're differentiating with respect to. If L depends on theta_1dot, it must be defined as such.
For example:
syms L(tau_1, theta_1, theta_1dot)
I hope this helps.
댓글 수: 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!