0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 function h=show2D(obj,XX,YY,ZZ,GZ,txt,funName)
0035 nbC=3;
0036 nbLevel=10;
0037
0038 if nargin<6;funName{1}='';end
0039 if nargin<5;txt=[];end
0040
0041 if iscell(ZZ)
0042 nbR=numel(ZZ)*2;
0043 if numel(funName)==1&&nbR~=1
0044 funName=repmat({''},1,nbR);
0045 end
0046 else
0047 nbR=2;
0048 nbC=3;
0049
0050 ZZ={ZZ};
0051 GZ={GZ};
0052 end
0053
0054 spaceX=[obj.xMin(1) obj.xMax(1)];
0055 spaceY=[obj.xMin(2) obj.xMax(2)];
0056
0057 h=figure('NumberTitle', 'off', 'Name', [txt ' function']);
0058 itS=1;
0059 warning off all;
0060 for itR=1:numel(ZZ)
0061 subplot(nbR,nbC,itS)
0062 surfCustom(XX,YY,ZZ{itR});
0063 axis('tight','square')
0064 xlabel('x'), ylabel('y'), title(funName{itR})
0065 xlim(spaceX)
0066 ylim(spaceY)
0067
0068 subplot(nbR,nbC,itS+1)
0069 surfCustom(XX,YY,GZ{itR}(:,:,1));
0070 axis('tight','square')
0071 xlabel('x'), ylabel('y'), title(['Grad. X ' funName{itR}])
0072 xlim(spaceX)
0073 ylim(spaceY)
0074
0075 subplot(nbR,nbC,itS+2)
0076 surfCustom(XX,YY,GZ{itR}(:,:,2));
0077 axis('tight','square')
0078 xlabel('x'), ylabel('y'), title(['Grad. Y ' funName{itR}])
0079 xlim(spaceX)
0080 ylim(spaceY)
0081
0082 subplot(nbR,nbC,itS+3)
0083 contourf(XX,YY,ZZ{itR},nbLevel);
0084 axis('tight','square')
0085 xlabel('x'), ylabel('y'), title(funName{itR})
0086 xlim(spaceX)
0087 ylim(spaceY)
0088
0089 subplot(nbR,nbC,itS+4)
0090 contourf(XX,YY,GZ{itR}(:,:,1),nbLevel);
0091 axis('tight','square')
0092 xlabel('x'), ylabel('y'), title(['Grad. X ' funName{itR}])
0093 xlim(spaceX)
0094 ylim(spaceY)
0095
0096 subplot(nbR,nbC,itS+5)
0097 contourf(XX,YY,GZ{itR}(:,:,2),nbLevel);
0098 axis('tight','square')
0099 xlabel('x'), ylabel('y'), title(['Grad. Y ' funName{itR}])
0100 xlim(spaceX)
0101 ylim(spaceY)
0102
0103 itS=itS+6;
0104 end
0105 warning on all;
0106 end