| 1 | gforget | 1.1 | function r = std(p,varargin) | 
| 2 | gforget | 1.2 | %overloaded gcmfaces std function : | 
| 3 |  |  | %  1) if single gcmfaces argument, then returns the global std over all faces | 
| 4 |  |  | %  2) if more than one argument, then simply calls double std function for | 
| 5 |  |  | %     each face data, passing over the other arguments | 
| 6 | gforget | 1.1 |  | 
| 7 |  |  | if nargin==1; | 
| 8 |  |  | tmp1=[]; | 
| 9 |  |  | for iFace=1:p.nFaces; | 
| 10 |  |  | iF=num2str(iFace); | 
| 11 |  |  | eval(['tmp1=[tmp1;p.f' iF '(:)];']); | 
| 12 |  |  | end; | 
| 13 |  |  | r=std(tmp1); | 
| 14 |  |  | return; | 
| 15 |  |  | end; | 
| 16 |  |  |  | 
| 17 |  |  | r=p; | 
| 18 |  |  |  | 
| 19 |  |  | for iFace=1:r.nFaces; | 
| 20 |  |  | iF=num2str(iFace); | 
| 21 |  |  | eval(['r.f' iF '=std(p.f' iF ',varargin{:});']); | 
| 22 |  |  | end; | 
| 23 |  |  |  | 
| 24 |  |  |  |