Changeset 21780


Ignore:
Timestamp:
07/13/17 14:15:05 (8 years ago)
Author:
Mathieu Morlighem
Message:

CHG: some exp changes, check on NaNs, change header of expcoarsen for nargin=2, figure copy is a default again

Location:
issm/trunk-jpl/src/m/exp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/exp/expcoarsen.m

    r14059 r21780  
    1 function expcoarsen(newfile,oldfile,resolution)
     1function expcoarsen(newfile,varargin)
    22%EXPCOARSEN - coarsen an exp contour
    33%
     
    77%   Usage:
    88%      expcoarsen(newfile,oldfile,resolution)
     9%      expcoarsen(file,resolution)
    910%
    1011%   Example:
     
    1213
    1314%Some checks
    14 if nargin~=3 | nargout
    15         error('expcoarsen usage: expcoarsen(newfile,oldfile,resolution)')
    16 elseif ~exist(oldfile)
    17         error(['expcut error message: the file ' oldfile ' does not exist'])
     15if nargin==2,
     16        resolution = varargin{1};
     17        oldfile= newfile;
     18elseif nargin==3,
     19        oldfile = varargin{1};
     20        resolution = varargin{2};
     21else
     22        error('bad usage');
     23end
     24
     25if ~exist(oldfile)
     26        error(['expcoarsen error message: file ''' oldfile ''' does not exist'])
    1827elseif exist(newfile),
    1928        choice=input(['A file ' newfile ' already exists, do you want to modify it? (y/n)'],'s');
  • issm/trunk-jpl/src/m/exp/expread.m

    r13730 r21780  
    6565        Struct(count).x=A(1,:)';
    6666        Struct(count).y=A(2,:)';
     67        if any(isnan(A))
     68                warning('NaNs found in coordinates, note that some tools like exptool will not work properly with NaNs');
     69        end
    6770
    6871        if(Struct(count).nods~=length(Struct(count).x))error(['Profile ' num2str(count) ' reports incorrect length']); end;
     
    7881end
    7982
     83
    8084%close file
    8185fclose(fid);
  • issm/trunk-jpl/src/m/exp/exptool.m

    r20663 r21780  
    9999
    100100%get current figure
    101 nofigurecopy=getfieldvalue(options,'nofigurecopy',1);
     101nofigurecopy=getfieldvalue(options,'nofigurecopy',0);
    102102if ~nofigurecopy,
    103103        if ~isempty(get(0,'children')),%if there is already a figure (return the number of opened figures)
Note: See TracChangeset for help on using the changeset viewer.