MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB毕业设计] 求助:matlab函数中网格划分问题 (https://www.labfans.com/bbs/showthread.php?t=10634)

213hf 2010-01-19 20:29

求助:matlab函数中网格划分问题
 
在下面这个函数中,xi,yj这可能有问题,但不知如何改正,因为i=10,j=100,下面xi^2+yj^2能直接相加吗?
function f=h(i,j,hx,hy)
rp=0.05;sp=0.4;
r1=sqrt(3.1415/sp)/2;
e=0.01;
delta=0.08;
xi=i*hx;
yj=j*hy;
yrj=yj-r1;
if mod(yj,2*r1)==0 & yj>r1
yj=2*r1;
else
yj=mod(yj,2*r1);
end
xi=xi-r1;yj=yj-r1;
if xi^2+yj^2>1
f=1;
else
f=1+e/delta;
end


所有时间均为北京时间。现在的时间是 14:22

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.