Changeset 26541


Ignore:
Timestamp:
11/04/21 13:35:00 (3 years ago)
Author:
Cheng Gong
Message:

CHG:indentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/modules/ExpToLevelSet.m

    r26540 r26541  
    1414% Check usage
    1515if nargin~=3
    16     help ExpToLevelSet
    17     error('Wrong usage (see above)');
     16        help ExpToLevelSet
     17        error('Wrong usage (see above)');
    1818end
    1919
     
    2121
    2222if ischar(contourname),
    23     [path,name,ext]=fileparts(contourname);
    24     if strcmpi(ext,'.shp'),
    25         %read contour from shapefile
    26         contourname=shpread(contourname);
    27         if isstruct(contourname)
    28             multipleShp = size(contourname, 2);
    29         end
    30     end
     23        [path,name,ext]=fileparts(contourname);
     24        if strcmpi(ext,'.shp'),
     25                %read contour from shapefile
     26                contourname=shpread(contourname);
     27                if isstruct(contourname)
     28                        multipleShp = size(contourname, 2);
     29                end
     30        end
    3131end
    3232
    3333% Call mex module
    3434if multipleShp>0
    35     % shp file contains multiple contours
    36     distance = zeros(length(x)+1, multipleShp);
    37     for i = 1:multipleShp
    38         distance(1:end-1, i) = ExpToLevelSet_matlab(x,y,contourname(i));
    39         % append the NAME information at the end of the distance
    40         if isfield(contourname(i),'NAME')
    41             distance(end, i) = contourname(i).NAME;
    42         else
     35        % shp file contains multiple contours
     36        distance = zeros(length(x)+1, multipleShp);
     37        for i = 1:multipleShp
     38                distance(1:end-1, i) = ExpToLevelSet_matlab(x,y,contourname(i));
     39                % append the NAME information at the end of the distance
     40                if isfield(contourname(i),'NAME')
     41                        distance(end, i) = contourname(i).NAME;
     42                else
    4343                        distance(end, i) = i;
    44         end       
    45     end
     44                end       
     45        end
    4646else
    47     % single shape or exp file
    48     distance = ExpToLevelSet_matlab(x,y,contourname);
     47        % single shape or exp file
     48        distance = ExpToLevelSet_matlab(x,y,contourname);
    4949end
Note: See TracChangeset for help on using the changeset viewer.