Building COM object...
mcc -M -silentsetup -d 'C:/Documents and Settings/Administrator/My Documents/zx81/src' -B 'ccom:zx81,zx81class,1.0' 'C:/Documents and Settings/Administrator/My Documents/zx81/src/zx81/zx81.m'
Error: File "zx81" is a script M-file and cannot be compiled with the current Compiler.
You may be able to correct this by converting this script into a function.
Try adding 'function zx81' as the first line of zx81.m.
%zx81.m
% 这是书本上的文件名。
% 本文件的功用与 exm081_1.m ,完全相同 <1>
a=2;b=2; % <2>
clf;shg
x=-a:0.2:a;y=-b:0.2:b;
for i=1:length(y)
for j=1:length(x)
if x(j)+y(i)>1
z(i,j)=0.5457*exp(-0.75*y(i)^2-3.75*x(j)^2-1.5*x(j));
elseif x(j)+y(i)<=-1
z(i,j)=0.5457*exp(-0.75*y(i)^2-3.75*x(j)^2+1.5*x(j));
else z(i,j)=0.7575*exp(-y(i)^2-6.*x(j)^2);
end
end
end
axis([-a,a,-b,b,min(min(z)),max(max(z))]);
colormap(flipud(winter));surf(x,y,z);