matlab, 偏微分clear all;nx=10;ny=10;hx=1/nx;x=linspace(0,1,nx+1);y=linspace(0,1,ny+1);x_plus_h=x+hx.*ones(1,nx+1);x_minus_h=x-hx.*ones(1,nx+1);for i=1:nx+1 for j=1:ny+1 f_x(j,i)=(f2(x_plus_h(i),y(j))-f2(x_minus_h(i),y(j)))./(2*hx); en

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 20:53:38
matlab, 偏微分clear all;nx=10;ny=10;hx=1/nx;x=linspace(0,1,nx+1);y=linspace(0,1,ny+1);x_plus_h=x+hx.*ones(1,nx+1);x_minus_h=x-hx.*ones(1,nx+1);for i=1:nx+1    for j=1:ny+1        f_x(j,i)=(f2(x_plus_h(i),y(j))-f2(x_minus_h(i),y(j)))./(2*hx);    en

matlab, 偏微分clear all;nx=10;ny=10;hx=1/nx;x=linspace(0,1,nx+1);y=linspace(0,1,ny+1);x_plus_h=x+hx.*ones(1,nx+1);x_minus_h=x-hx.*ones(1,nx+1);for i=1:nx+1 for j=1:ny+1 f_x(j,i)=(f2(x_plus_h(i),y(j))-f2(x_minus_h(i),y(j)))./(2*hx); en
matlab, 偏微分
clear all;
nx=10;
ny=10;
hx=1/nx;
x=linspace(0,1,nx+1);
y=linspace(0,1,ny+1);
x_plus_h=x+hx.*ones(1,nx+1);
x_minus_h=x-hx.*ones(1,nx+1);
for i=1:nx+1
for j=1:ny+1
f_x(j,i)=(f2(x_plus_h(i),y(j))-f2(x_minus_h(i),y(j)))./(2*hx);
end;
end;
怎么把f_x(j,i)这个数值弄出来,应该有11个数值才对
function z=f2(x,y)
z=x.^3.*y.^2;
这是另一个文件

matlab, 偏微分clear all;nx=10;ny=10;hx=1/nx;x=linspace(0,1,nx+1);y=linspace(0,1,ny+1);x_plus_h=x+hx.*ones(1,nx+1);x_minus_h=x-hx.*ones(1,nx+1);for i=1:nx+1 for j=1:ny+1 f_x(j,i)=(f2(x_plus_h(i),y(j))-f2(x_minus_h(i),y(j)))./(2*hx); en
你的f_x是个11*11的矩阵