Changeset 26221


Ignore:
Timestamp:
04/29/21 11:52:01 (4 years ago)
Author:
Eric.Larour
Message:

CHG: extended to a 3D plot type.

File:
1 edited

Legend:

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

    r25685 r26221  
    11function contours=contourlevelzero(md,mask,level)
    2 %CONTOURLEVELZERO - figure out the zero level (or offset thereof, specified by
    3 %the level value) of a vectorial mask, and vectorialize it into an exp or shp
    4 %compatible structure.
     2%CONTOURLEVELZERO - figure out the zero level (or offset thereof, specified by the level value)
     3%                   of a vectorial mask, and vectorialize it into an exp or shp compatible
     4%structure.
    55%
    66%   Usage:
     
    99%   See also: PLOT_CONTOUR
    1010
    11 if isempty(mask)
    12         error('mask provided is empty');
    13 end
    14 
    1511%process data
    1612if dimension(md.mesh)==3,
     13%       error('contourlevelzero error message: routine not supported for 3d meshes, project on a layer');
    1714        x = md.mesh.x2d;
    1815        y = md.mesh.y2d;
     
    2421end
    2522
    26 if isfield(md.mesh,'z'),
     23if isprop(md.mesh,'z'),
    2724        z=md.mesh.z;
    2825else
     
    3027end
    3128
     29if isempty(mask), error('mask provided is empty'); end
    3230if dimension(md.mesh)==3,
    33         if length(mask)~=md.mesh.numberofvertices2d, error('Since this is a 3d model, you need to project the mask on a layer (e.g. project2d(md,mask,0))'); end
     31        if length(mask)~=md.mesh.numberofvertices2d, error('mask provided should be specified at the vertices of the mesh'); end
    3432else
    3533        if length(mask)~=md.mesh.numberofvertices, error('mask provided should be specified at the vertices of the mesh'); end
Note: See TracChangeset for help on using the changeset viewer.