Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

get

Instrument object properties

Syntax

get(obj)
out = get(obj)
out = get(obj,'PropertyName')

Arguments

obj

An instrument object or an array of instrument objects.

'PropertyName'

A property name or a cell array of property names.

out

A single property value, a structure of property values, or a cell array of property values.

Description

get(obj) returns all property names and their current values to the command line for obj. The properties are divided into two sections. The base properties are listed first and the object-specific properties are listed second.

out = get(obj) returns the structure out where each field name is the name of a property of obj, and each field contains the value of that property.

out = get(obj,'PropertyName') returns the value out of the property specified by PropertyName for obj. If PropertyName is replaced by a 1-by-n or n-by-1 cell array of character vectors containing property names, then get returns a 1-by-n cell array of values to out. If obj is an array of instrument objects, then out will be an m-by-n cell array of property values where m is equal to the length of obj and n is equal to the number of properties specified.

Examples

This example illustrates some of the ways you can use get to return property values for the GPIB object g.

g = gpib('ni',0,1);
out1 = get(g);
out2 = get(g,{'PrimaryAddress','EOSCharCode'});
get(g,'EOIMode')
ans =
on

Tips

When specifying a property name, you can do so without regard to case, and you can make use of property name completion. For example, if g is a GPIB object, then these commands are all valid.

out = get(g,'EOSMode');
out = get(g,'eosmode');
out = get(g,'EOSM');

See Also

| |

Introduced before R2006a

Was this topic helpful?