Changeset 26221
- Timestamp:
- 04/29/21 11:52:01 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/exp/contourlevelzero.m
r25685 r26221 1 1 function 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 shp4 % compatiblestructure.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. 5 5 % 6 6 % Usage: … … 9 9 % See also: PLOT_CONTOUR 10 10 11 if isempty(mask)12 error('mask provided is empty');13 end14 15 11 %process data 16 12 if dimension(md.mesh)==3, 13 % error('contourlevelzero error message: routine not supported for 3d meshes, project on a layer'); 17 14 x = md.mesh.x2d; 18 15 y = md.mesh.y2d; … … 24 21 end 25 22 26 if is field(md.mesh,'z'),23 if isprop(md.mesh,'z'), 27 24 z=md.mesh.z; 28 25 else … … 30 27 end 31 28 29 if isempty(mask), error('mask provided is empty'); end 32 30 if 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))'); end31 if length(mask)~=md.mesh.numberofvertices2d, error('mask provided should be specified at the vertices of the mesh'); end 34 32 else 35 33 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.