how I can replace diff(x(t), t) with xdot ?

>> syms t;
>> x=sym('x(t)');
>> f=sin(x);
>> diff(f,t)
ans =
cos(x(t))*diff(x(t), t)

1 个评论

sorry my question is: how I can replace diff(x(t), t) with xdot ? thanks

请先登录,再进行评论。

回答(1 个)

syms t xdot;
x = sym('x(t)');
f = sin(x);
df = diff(f,t);
subs(df,'diff(x(t), t)',xdot)

类别

帮助中心File Exchange 中查找有关 Financial Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by