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

Annotation of /MITgcm_contrib/gael/matlab_class/@gcmfaces/ones.m

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


Revision 1.1 - (hide annotations) (download)
Tue Apr 4 15:34:58 2017 UTC (8 years, 3 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66f, HEAD
- overload a few more basic functions

1 gforget 1.1 function r = ones(p,varargin)
2     %overloaded gcmfaces ones function :
3     % if the first arguments is a gcmfaces object
4     % we call the double ones function for each face data
5     % using face dimensions for the first two arguments and
6     % passing over the other arguments
7    
8     r=p;
9    
10     for iFace=1:r.nFaces;
11     iF=num2str(iFace);
12     eval(['[n1,n2]=size(p.f' iF '(:,:,1));']);
13     eval(['r.f' iF '=ones(n1,n2,varargin{:});']);
14     end;
15    
16    

  ViewVC Help
Powered by ViewVC 1.1.22