function f=yuandu_mzc(x)
r=[2.8,0,-3.4,-4.7,-4.1,-6.0,-7.8,-8.4,-11.2,-11.9,-13.8,-14.4,-13.8,-16.4,-14.5,-14.8
-16.0,-14.5,-14.8,-16.0,-14.5,-16.0,-16.0,-15.7,-14.8,-15.1,-12.5,-13.4,-9.4,-10.1,
-8.8,-9.7,-8.7,-8.7,-6.7,-4.6,-3.8,-1.7,-0.7,2.1,2.0,5.1,5.7,7.0,7.9,9.6,11.9,10.1,
14.2,15.0,16.9,16.9,17.0,18.6,19.8,20.9,19.6,20.9,20.3,17.8,21.0,18.9,18.7,14.1,17.9,14.9,
15.6,14.5,11.0,13.5,7.0,10.0,6.9,4.0,4.1];
theta=[2*pi/72:2*pi/72:2*pi]';
x=[-8:1:12]';
y=[-27:1:-7]';
for i=1:21
z(i)=max(r'-x(i)*cos(theta)-y(i)*sin(theta))-min(r'-x(i)*cos(theta)-y(i)*sin(theta));
end
[a1,b1]=meshgrid(-8:2:12,-27:2:-7);
z1=griddata(x,y,z,a1,b1,'v4');
subplot(1,2,1),
surf(a1,b1,z1),
axis([-8,12,-27,-7,5,35]);
subplot(1,2,2),
contour(a1,b1,z1,10)
眼眸繁星
相关分类