Change the function in a matrix (diff(f(x), x) to some variable.

Hello,
I want to know if it is possible to change the diff function to a variable which i want to call it like the following. (change it in the answer given by matlab).
  • %diff(a(t), t)=a_dot
  • %diff(a(t), t, t)=a_doubledot
  • %diff(d(t), t)=d_dot
  • %diff(d(t), t, t)=d_doubledot
  • This is my code:
clc
syms a(t) r d(t)
r=[d*cos(a);d*sin(a);0];
r_dot=diff(r);
r_doubledot=diff(r_dot);
BCN=[cos(a),sin(a),0;-sin(a),cos(a),0;0,0,1];
br_doubledot=BCN*r_doubledot;
br_doubledot=simplify(br_doubledot)
Answer:
br_doubledot(t) =
diff(d(t), t, t) - d(t)*diff(a(t), t)^2
d(t)*diff(a(t), t, t) + 2*diff(a(t), t)*diff(d(t), t)
0

답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2018년 10월 10일

편집:

2018년 10월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by