imat_shp/get


Purpose

Get one or more attributes of an imat_shp object.

Syntax

v=get(s,'Attrib')
v=get(s,'Attrib1','Attrib2',...)
v=get(s)

Description

When applied to an imat_shp object s, the GET function returns the values of selected attributes of s. The available attributes are listed here. Attribute names are not case sensitive.

If only a single attribute is requested, then the value of that attribute is returned, or printed if no output argument is supplied. Numeric attributes are returned in a numeric array with the same dimensions as s. String-valued attributes (including list attributes) are returned in a string variable (if s is a single mode) or a cell array of strings with the same dimensions as s (if s contains more than one mode). The Node attribute returns a numeric array with an extra initial dimension equal to the largest number of nodes in s. (For example, if s is 2x3 and all modes have 10 or fewer nodes, then the returned value is a 10x2x3 array.) The Shape attribute similarly returns a numeric array with an extra dimension equal to the largest number of nodal DOF (number of nodes times number of degrees of freedom per node). If any of the modes has a smaller number of nodes or shape coefficients, that column will be padded with NaN values.

If more than one attribute is specified, then the output argument will be a scalar structure variable with field names equal to the requested attributes. The value of each field will be as described above. If no output argument is supplied, the resulting structure will be printed on the standard output.

If no attributes are specified, then the values of all attributes will be returned as described above.

An alternative to the get function is the syntax s.attrib.

Examples

>> setunits('in')
Units set to IN
>> s=readunv('/ms5/examples/tda/air_test_shapes.unv')
Universal file written in MM units, converting to IN
Read 10x1 imat_shp

s =
10x1 IMAT Shape with the following attributes:
Row Frequency           Damping             NumberNodes
--- ------------------- ------------------- -------------------
1   100.334             0.00777494          30
2   146.458             0.00738474          30
3   296.134             0.00306095          30
4   296.721             0.00344297          30
5   405.738             0.00250777          30
6   474.503             0.00189975          30
7   487.771             0.00192485          30
8   521.287             0.00290228          30
9   582.747             0.00147384          30
10  851.518             0.00138781          30

>> shp=get(s,'shape');
>> size(shp)

ans =
      90    10

>> get(s(1))
         IDLine1: ''
         IDLine2: ''
         IDLine3: ''
         IDLine4: ''
         IDLine5: ''
 AbscissaAxisLab: ''
AbscissaUnitsLab: ''
 OrdinateAxisLab: ''
OrdinateUnitsLab: ''
      CreateDate: '30-Dec-97   14:30:26'
      ModifyDate: ''
       OwnerName: ''
            Node: [30x1  double]
           Shape: [90x1  double]
       Frequency: 100.3340
         Damping: 0.0078
   ModalMassReal: 5.3926e+03
   ModalMassImag: 0
ModalDampingReal: 0
ModalDampingImag: 0
   ReferenceNode: 0
    ReferenceDir: ''
  ReferenceCoord: ''
    ResponseNode: 0
     ResponseDir: ''
   ResponseCoord: ''
     NumberNodes: 30
       ShapeType: 'Real'
         DOFType: '3DOF'
  SolutionMethod: 'User Defined'
  OrdNumDataType: 'Unknown'
  OrdNumTypeQual: 'Translation'
 OrdNumExpLength: 0
  OrdNumExpForce: 0
   OrdNumExpTemp: 0
   OrdNumExpTime: 0
  OrdDenDataType: 'Unknown'
  OrdDenTypeQual: 'Translation'
 OrdDenExpLength: 0
  OrdDenExpForce: 0
   OrdDenExpTemp: 0
   OrdDenExpTime: 0

>>

See Also

imat_shp, imat_shp/set