请教matlab 循环怎么用啊 程序如下:xx=[-0.02:0.0004:0.02];yy=[0:0.01:1];a=0.1;for i=1:101x=xx(1,i)for j=1:101y=yy(1,j)phy(x,y)=(1/pi)*atan((sin(pi*y)*sinh(pi*a/2))/(cosh(pi*x)-cosh(pi*y)*cosh(pi*a/2)));endend显示Attempted to access (-0.
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 05:36:35
请教matlab 循环怎么用啊 程序如下:xx=[-0.02:0.0004:0.02];yy=[0:0.01:1];a=0.1;for i=1:101x=xx(1,i)for j=1:101y=yy(1,j)phy(x,y)=(1/pi)*atan((sin(pi*y)*sinh(pi*a/2))/(cosh(pi*x)-cosh(pi*y)*cosh(pi*a/2)));endend显示Attempted to access (-0.
请教matlab 循环怎么用啊 程序如下:
xx=[-0.02:0.0004:0.02];
yy=[0:0.01:1];
a=0.1;
for i=1:101
x=xx(1,i)
for j=1:101
y=yy(1,j)
phy(x,y)=(1/pi)*atan((sin(pi*y)*sinh(pi*a/2))/(cosh(pi*x)-cosh(pi*y)*cosh(pi*a/2)));
end
end
显示Attempted to access (-0.02,0); index must be a positive integer or logical 请问该怎么办啊
请教matlab 循环怎么用啊 程序如下:xx=[-0.02:0.0004:0.02];yy=[0:0.01:1];a=0.1;for i=1:101x=xx(1,i)for j=1:101y=yy(1,j)phy(x,y)=(1/pi)*atan((sin(pi*y)*sinh(pi*a/2))/(cosh(pi*x)-cosh(pi*y)*cosh(pi*a/2)));endend显示Attempted to access (-0.
phy(x,y)应该是p(i,j)
最好xx=[-0.02:0.0004:0.02];
yy=[0:0.01:1];
a=0.1;
for i=1:101
x=xx(1,i) ;
for j=1:101
y=yy(1,j);
phy(x,y)=(1/pi)*atan((sin(pi*y)*sinh(pi*a/2))/(cosh(pi*x)-cosh(pi*y)*cosh(pi*a/2)));
end
end
phy
这样x和y就不显示了,只显示结果