Matlab:评估二阶导数

时间:2015-06-06 09:09:43

标签: matlab derivative

在我取得函数f的第二个偏导数后,

second_div = diff(f,pz,2);

second_div现在应该是pzu

的函数

我想在second_div评估(pz,u)。我该怎么做?

ATTEMPTS

second_div(2,3); <- failed because second_div is a 1*1 sym
vpa(subs(second_div,pz,u_m,2,3)); <- failed
vpa(subs(second_div,(pz,u_m),(2,3))); <- failed

感谢。

1 个答案:

答案 0 :(得分:0)

mathworks.com/help/symbolic/subs.html开始,您可以替换{}中的变量列表:

syms f pz u
f = u*pz^3
second_div = diff(f,pz,2);
subs(second_div,{pz,u},[3,4])

按预期提供72