使用MATLAB计算函数的二阶导数

时间:2015-04-19 15:24:52

标签: matlab derivative

我按照以下步骤使用MATLAB计算函数的二阶导数 -

syms a b;
th = sym('th(t)'); %th is a time dependent variable
y = diff(a^2*cos(th)+(b/12)*sin(th));
thd = diff(th); %derivative of th wrt time
ybythd = diff(y,thd); %derivative of y wrt thd
p = diff(ybythd); %derivative of ybythd wrt time

p的值为p = diff(diff((b*cos(th(t))*diff(th(t), t))/12 - a^2*sin(th(t))*diff(th(t), t), t), diff(th(t), t))

我在上述结果中没有看到d2th/dt2的任何术语。这里出了什么问题?

0 个答案:

没有答案