在我取得函数f
的第二个偏导数后,
second_div = diff(f,pz,2);
second_div
现在应该是pz
和u
我想在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
感谢。
答案 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
。