MATLAB中偏导数的计算

请写出在MATLAB中的全部步骤。谢谢!!!求大神解答急急急急... 请写出在MATLAB中的全部步骤。谢谢!!!
求大神解答 急急急急
展开
 我来答
Miafifi
推荐于2016-03-24 · TA获得超过451个赞
知道小有建树答主
回答量:277
采纳率:93%
帮助的人:166万
展开全部

Your question is very difficult indeed. So far I cannot find any helpful information available either online or textbook to help me generate a correct solution indeed. 


But here is my code to just get petty net result as you expect to apply in your question above. If you like it, don't forget to give me a thumb up! Cheers ~

- - - - - - - - - - - - - - - - - - - - c o d e - - - - - - - - - - - - - - - - - - - -

clear all


syms x y z


% define a function 'f' in terms of 'x', 'y' and 'z'

f = exp(z)-x*y*z;


zOFxy = sym('z(x,y)');

fprintf('\n')


% replace z with z(x,y)

f_zOFxy = subs(f, z, zOFxy);

disp('F(x,y,z) = ')

pretty(f_zOFxy)         % 1st print F(x,y,z)

fprintf('\n')


% 1st derivative with respect to x

dfx = diff(f_zOFxy, x);


% 2nd derivative with respect to y

dfxy = diff(dfx, y);


disp('F(x,y,z)'' = ')

pretty(dfxy)            % 2nd print F''(x,y,z)


dzOFxy = diff(diff(zOFxy, x), y);


syms Zxy Zx Zy Z

% replace the symbolic derivative like:

%   ∂

%  -- z(x,y) -> Zx

%  ∂x

%

%   ∂

%  -- z(x,y) -> Zy

%  ∂y

%   ∂

%  --- z(x,y) -> Zxy

%  ∂xy

df1 = subs(dfxy, diff(zOFxy, x), Zx);

df2 = subs(df1, diff(zOFxy, y), Zy);

df3 = subs(df2, dzOFxy, Zxy);

df4 = subs(df3, zOFxy, Z);


% move Zxy to the left side of equation

dzOVERdxy = solve(df4, Zxy);


pretty(dzOVERdxy)       % 3rd print Zxy = ....

- - - - - - - - - - - - - - - - - - - - c o d e - - - - - - - - - - - - - - - - - - - -

I don't know why I fail to find the code input selection on the tool box in this reply. Plain txt fomat might be quite indiscernible to read though. So my personal suggestion is to copy the code to your Matlab and the code should display like:

After running my code, you should also generate the exactly same result as shown below.

推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式