MATLAB XPC TARGET RELEASE NOTES Guía de usuario Pagina 34

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 531
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 33
2 Targets and Scopes in the MATLAB
®
Interface
Getting the Value of a Scope Property
You can list a property value in the MATLAB window or assign that value
to a MATLAB variable. With the xPC Target software you can use either a
function syntax or an object property sy ntax.
The syntax
get(scope_object_vector, property_name) can be replaced by
scope_object_vector(index_vector).property_name
For example, to assign the number of samples from the scope object sc1,
In the MATLAB window, type
numsamples = sc1.NumSamples
Alternatively, you can type
numsamples = get(sc1,'NumSamples')
or
sc1.get(NumSamples)
Note that y ou cannot u se dot notation to get the values of vecto r o bject
properties. To g et properties of a vector of scopes, use the
get method. For
example, assume you have two scopes,
1 and 2, assigned to the variable sc12.
To get the value of
NumSamples for these scopes, in the MATL AB window, type
get(sc12,'NumSamples')
You get a result like the following:
ans =
[300]
[300]
To get a list of readable properties, type scope_object. The property values
are listed in the MATLAB window.
2-10
Vista de pagina 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 530 531

Comentarios a estos manuales

Sin comentarios