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

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

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

revision 1.1 by dimitri, Thu Dec 5 08:06:18 2002 UTC revision 1.1.2.1 by dimitri, Thu Dec 5 08:06:18 2002 UTC
# Line 0  Line 1 
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')

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.22