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

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

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


Revision 1.1 - (hide annotations) (download)
Fri Apr 30 18:44:16 2010 UTC (15 years, 2 months ago) by gforget
Branch: MAIN
conversion from faces object to 1D vector

1 gforget 1.1 function [a]=convert2array(b,varargin);
2    
3     if isa(b,'gcmfaces'); do_gcmfaces2vector=1; else; do_gcmfaces2vector=0; end;
4    
5     if do_gcmfaces2vector;
6     bb=convert2array(b);
7     a=bb(:);
8     else;
9     c=varargin{1};
10     bb=convert2array(c);
11     if length(bb(:))~=length(b(:)); error('wrong size of inputs'); end;
12     b=reshape(b,size(bb));
13     a=convert2array(b,c);
14     end;
15    
16    
17    

  ViewVC Help
Powered by ViewVC 1.1.22