imat_elem/keep


Purpose

Keep elements.

Syntax

elem=keep(elem,1:10)
elem=elem.keep(1:10)

Description

KEEP returns an IMAT_ELEM object containing the elements specified in ID.

If ID is numeric, KEEP keeps the elements in ID that exist in ELEM in the order specified in ID. KEEP will issue a warning if there are elements in ID that do not exist in ELEM.

If ID is logical, the elements matching the ID mask will be kept.

Examples

>> fem=readunv('fem_file.unv')

fem =

IMAT_FEM Finite Element Model
         1 coordinate system
        30 nodes
        10 elements
         3 tracelines

>> elem=fem.elem;
>> elem=elem.keep(1:3);
>> elem=keep(elem,node.id==3);

 

See Also

imat_elem/add, imat_elem/remove