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 commentaire

Ahmed Eltayeb
Ahmed Eltayeb le 29 Sep 2012
sorry my question is: how I can replace diff(x(t), t) with xdot ? thanks

Connectez-vous pour commenter.

Réponses (1)

Oleg Komarov
Oleg Komarov le 29 Sep 2012
syms t xdot;
x = sym('x(t)');
f = sin(x);
df = diff(f,t);
subs(df,'diff(x(t), t)',xdot)

Catégories

En savoir plus sur Financial Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by