/[MITgcm]/MITgcm/verification/lab_sea/matlab/mypcolor.m
ViewVC logotype

Contents of /MITgcm/verification/lab_sea/matlab/mypcolor.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2.4.1 - (show annotations) (download)
Sat Feb 15 12:40:31 2003 UTC (21 years, 1 month ago) by dimitri
Branch: ecco-branch
CVS Tags: ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, icebear5, icebear4, icebear3, icebear2, ecco_c50_e29, ecco_c50_e28, ecco_c50_e33a, ecco_c51_e34, ecco_c44_e27
Branch point for: icebear
Changes since 1.2: +0 -0 lines
o added verification/lab_sea as per release1_p12_pre

1 function h=mypcolor(x,y,z)
2 % mypcolor(x,y,z) simulate pcolor using image (much faster)
3
4 if nargin == 1
5 h=image(x,'CDataMapping','scaled');
6 elseif nargin ==3
7 dx=diff(x);
8 dy=diff(y);
9 if min(dx)==max(dx) & min(dy)==max(dy)
10 h=image(x,y,z,'CDataMapping','scaled');
11 else
12 dx=min(x):min(abs(dx)):max(x);
13 dy=min(y):min(abs(dy)):max(y);
14 dz=interp2(x,y,z,dx,dy');
15 h=image(dx,dy,dz,'CDataMapping','scaled');
16 end
17 else
18 error('wrong number of arguments')
19 end
20 set(gca,'ydir','normal')

  ViewVC Help
Powered by ViewVC 1.1.22