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

10 visualizaciones (últimos 30 días)
Ahmed Eltayeb
Ahmed Eltayeb el 29 de Sept. de 2012
>> syms t;
>> x=sym('x(t)');
>> f=sin(x);
>> diff(f,t)
ans =
cos(x(t))*diff(x(t), t)
  1 comentario
Ahmed Eltayeb
Ahmed Eltayeb el 29 de Sept. de 2012
sorry my question is: how I can replace diff(x(t), t) with xdot ? thanks

Iniciar sesión para comentar.

Respuestas (1)

Oleg Komarov
Oleg Komarov el 29 de Sept. de 2012
syms t xdot;
x = sym('x(t)');
f = sin(x);
df = diff(f,t);
subs(df,'diff(x(t), t)',xdot)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by