set
Configure or display instrument object properties
Syntax
set(obj)
props = set(obj)
set(obj,'PropertyName')
props = set(obj,'PropertyName')
set(obj,'PropertyName',PropertyValue,...)
set(obj,PN,PV)
set(obj,S)
Arguments
| 
 | An instrument object or an array of instrument objects. | 
| 
 | A property name for  | 
| 
 | A property value supported by
                                         | 
| 
 | A cell array of property names. | 
| 
 | A cell array of property values. | 
| 
 | A structure with property names and property values. | 
| 
 | A structure array whose field names are the property names
                                    for  | 
Description
set(obj) displays all configurable
                property values for obj. If a property has a finite list of
                possible character vector values, then these values are also displayed.
props = set(obj) returns all configurable
                properties and their possible values for obj to
                    props. props is a structure whose field
                names are the property names of obj, and whose values are cell
                arrays of possible property values. If the property does not have a finite set of
                possible values, then the cell array is empty.
set(obj,'
                displays the valid values for PropertyName')PropertyName if it
                possesses a finite list of character vector values.
props = set(obj,'
                returns the valid values for PropertyName')PropertyName to
                    props. props is a cell array of possible
                character vector values or an empty cell array if
                    PropertyName does not have a finite list of possible
                values.
set(obj,'
                configures multiple property values with a single command.PropertyName',PropertyValue,...)
set(obj,PN,PV) configures the properties
                specified in the cell array of character vectors PN to the
                corresponding values in the cell array PV. PN
                must be a vector. PV can be m-by-n where m is equal to the number
                of instrument objects in obj and n is equal to the length of
                    PN.
set(obj,S) configures the named
                properties to the specified values for obj. S
                is a structure whose field names are instrument object properties, and whose field
                values are the values of the corresponding properties.
Examples
This example illustrates some of the ways you can use set to
                configure or return property values for the GPIB object g.
g = gpib('ni',0,1);
set(g,'EOSMode','read','OutputBufferSize',50000)
set(g,{'EOSCharCode','RecordName'},{13,'sydney.txt'})
set(g,'EOIMode')
[ {on} | off ]Tips
You can use any combination of property name/property value pairs, structure
                arrays, and cell arrays in one call to set. Additionally, you can
                specify a property name without regard to case, and you can make use of property
                name completion. For example, if g is a GPIB object, then the
                following commands are all valid.
set(g,'EOSMode') set(g,'eosmode') set(g,'EOSM')
Version History
Introduced before R2006a