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 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by