imat_fn/get


Purpose

Get one or more attributes of an imat_fn object.

Syntax

v=get(f,'Attrib')
v=get(f)

Description

When applied to an imat_fn object f, the GET function returns the values of selected attributes of f. 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 f. String-valued attributes (including list attributes) are returned in a string variable (if f is a single function) or a cell array of strings with the same dimensions as f (if f contains more than one function). The Abscissa attribute returns a numeric array with an extra initial dimension equal to the largest number of abscissa values in f. (For example, if f is 2x3 and all functions have 100 or fewer abscissa values, then the returned value is a 100x2x3 array.) The Ordinate attribute similarly returns a numeric array with an extra dimension equal to the largest number of abscissa values. If any of the functions in f have a smaller number of abscissa values, that column will be padded with NaN values. Note that an Abscissa array is returned even for evenly spaced functions. In such cases, the abscissa values are not actually stored in the function, but are created by the get function.

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 f.attrib.

Examples

>> setunits('in');
Units set to IN
>> f=readunv('/ms5/examples/tda/air_2ref.unv');
Universal file written in MM units, converting to IN
Read 14x1 imat_fn

f =
14x1 IMAT Function with the following attributes:
Record Name          FunctionType     AbscissaSpacing  NumberElements
-------------------- ---------------- ---------------- ----------------
1_(,2Z+)             Time Response    Even             20480
2_(,14Z+)            Time Response    Even             20480
3_(,2X+)             Time Response    Even             20480
4_(,2Y+)             Time Response    Even             20480
5_(,2Z+)             Time Response    Even             20480
6_(,14X+)            Time Response    Even             20480
7_(,14Y+)            Time Response    Even             20480
8_(,14Z+)            Time Response    Even             20480
9_(,30X+)            Time Response    Even             20480
10_(,30Y+)           Time Response    Even             20480
11_(,30Z+)           Time Response    Even             20480
12_(,24X+)           Time Response    Even             20480
13_(,24Y+)           Time Response    Even             20480
14_(,24Z+)           Time Response    Even             20480

>> x=get(f,'ordinate');
>> size(x)

ans =
       20480          14

>> get(f,'responsecoord','abscissamin')
ResponseCoord: {14x1 cell}
  AbscissaMin: 0

>>

See Also

imat_fn/set