0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 function h = plot_surface(ds,BB,delta_x,varargin)
0015
0016 args = plot_surfaceArgs(varargin{:});
0017
0018 Nr = size(ds,1); Mc = size(ds,2);
0019
0020 X = ([0:Nr-1]'*ones(1,Mc))*delta_x+BB(1);
0021 Y = (ones(Nr,1)*[0:Mc-1])*delta_x+BB(2);
0022
0023 colormap(args.colormap)
0024
0025 switch args.ColorFct
0026 case 'smoothtanh'
0027 shade = -[ 0 -1; 1 0]/sqrt(2);
0028 col=conv2(ds,shade,'same');
0029
0030 colo=min(1, max(0,tanh(100*(col-0)/(max(col(:))-min(col(:))))));
0031
0032 h = args.plotfun(X,Y,ds,colo);
0033 case 'none'
0034 h = args.plotfun(X,Y,ds);
0035 end
0036 set(h,'FaceLighting',args.FaceLighting,'EdgeColor',args.EdgeColor)
0037 set(gca,'XGrid',args.Grid)
0038 set(gca,'YGrid',args.Grid)
0039 set(gca,'ZGrid',args.Grid)
0040
0041 alpha(args.alpha);
0042 if ~strcmp(args.shading,'none')
0043 shading(args.shading);
0044 end
0045 view(args.view);