book_4_58.m
Mesh plot after surface fit using loess2
if ~exist('newzEw', 'var') load galaxy % loess surface fit parameters alpha = 0.25; lambda = 2; % Smooth and grid the data XI = -25:5:25; YI = (-45:5:45)'; nx = length(XI); ny = length(YI); newx = repmat(XI,ny,1); newy = repmat(YI,1,nx); newzEw = loess2(EastWest,NorthSouth,Velocity,newx,newy,alpha,lambda,1); end mesh(newx,newy,newzEw); xlabel('East-West') ylabel('North-South') zlabel('Velocity') title('Galaxy') view(150,25) colormap jet
