** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=MITgcm at /usr/local/share/lxr/lib/LXR/Common.pm line 1224.

Last-Modified: Fri, 31 Oct 2024 05:11:45 GMT Content-Type: text/html; charset=utf-8 MITgcm/MITgcm/verification/lab_sea/matlab/mypcolor.m
Back to home page

MITgcm

 
 

    


Warning, /verification/lab_sea/matlab/mypcolor.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit baa476ee on 2002-12-05 08:43:03 UTC
baa476eeba Dimi*0001 function h=mypcolor(x,y,z)
                0002 % mypcolor(x,y,z)     simulate pcolor using image (much faster)
                0003 
                0004 if nargin == 1
                0005   h=image(x,'CDataMapping','scaled');
                0006 elseif nargin ==3
                0007   dx=diff(x);
                0008   dy=diff(y);
                0009   if min(dx)==max(dx) & min(dy)==max(dy)
                0010     h=image(x,y,z,'CDataMapping','scaled');
                0011   else
                0012     dx=min(x):min(abs(dx)):max(x);
                0013     dy=min(y):min(abs(dy)):max(y);
                0014     dz=interp2(x,y,z,dx,dy');
                0015     h=image(dx,dy,dz,'CDataMapping','scaled');
                0016   end
                0017 else
                0018   error('wrong number of arguments')
                0019 end 
                0020 set(gca,'ydir','normal')