/[MITgcm]/MITgcm_contrib/gael/matlab_class/@gcmfaces/and.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/matlab_class/@gcmfaces/and.m

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


Revision 1.1 - (show annotations) (download)
Wed Feb 10 14:43:47 2010 UTC (15 years, 5 months ago) by gforget
Branch: MAIN
matlab_class core routine: gcmfaces methods

1 function r = and(p,q)
2
3 if isa(p,'gcmfaces'); r=p; else; r=q; end;
4 for iFace=1:r.nFaces;
5 iF=num2str(iFace);
6 if isa(p,'gcmfaces')&isa(q,'gcmfaces');
7 eval(['r.f' iF '=p.f' iF '&q.f' iF ';']);
8 elseif isa(p,'gcmfaces')&isa(q,'double');
9 eval(['r.f' iF '=p.f' iF '&q;']);
10 elseif isa(p,'double')&isa(q,'gcmfaces');
11 eval(['r.f' iF '=p&q.f' iF ';']);
12 else;
13 error('gcmfaces and: types are incompatible')
14 end;
15 end;
16
17

  ViewVC Help
Powered by ViewVC 1.1.22