这段程序应该怎么改,总是报错

%小尺度-100个
d=100;
L=50;
deltax=0.1;
deltay=0.1;
nx=d/deltax;
ny=L/deltay;
lamta=d/L;
lam=((lamta*(deltax*pi/180))/deltay)^2;
H=ones(nx+1,ny+1); %计算间隙初始值
BM=zeros(nx+1,ny+1); %表面形貌
Z=zeros(nx+1,ny+1);

%计算间隙初始值
for i=1:1:nx+1
for j=1:1:ny+1
theta=(i-1)deltax;
thetb=(j-1)deltay;
H(i,j)=0.8+0.2
theta/100;
%BM(i,j)=1-0.2
theta/100;
end
end

[x,y]=meshgrid((0:deltay:L),(0:deltax:d));
rand(‘state’,150509)
for k=1:1:100
ax=randint(1,1,[0,L]);
ay=randint(1,1,[0,d]);
mu=[ax ay];
sigma=[0.5 0;0 0.5];
X=[x(? y(?];
z1=0.05*mvnpdf(X,mu,sigma);
Z1=reshape(z1,nx+1,ny+1);
Z=Z+Z1;
end
H1=Z; %微凸体高度

H=H-H1;
figure(1)
警告: This is an obsolete function and may be removed in the future.
Please use RANDI instead.

In randint at 40
未定义与 ‘double’ 类型的输入参数相对应的函数 ‘RANDI’。
出错 randint (line 43)
error(RANDI(0,4,nargin,‘struct’));

你可能感兴趣的:(这段程序应该怎么改,总是报错)