Error "()-indexing must appear last in an index expression" in symbolic Matlab Toolbox
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello everyone, I want to operate with some symbolic expressions and their derivatives, but I'm finding some problems when trying to do something like this:
>>syms x(t)
>>q=diff(x,t)+2
q(t) =
D(x)(t) + 2
>>dq=diff(q,D(x)(t))
Error: ()-indexing must appear last in an index expression.
I want to differentiate q(t) with respect to the derivative of x(t), and I was wondering if there is any way to do this without substituting D(x)(t) for another variable
답변 (1개)
Mischa Kim
2016년 8월 25일
편집: Mischa Kim
2016년 8월 25일
Paco, check out the Euler-Lagrange tool on File Exchange. It does exactly what you are trying to do.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!