MATLAB BUILDER JA 2 Guide de l'utilisateur Page 78

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 292
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 77
4 Using MWArra y Classes
Guidelines for Wo rking with MWArray Classes
Overview of the MWArray API
The MWArray Java API is a class hierarchy that represents the major
MATLAB array types. The root class is
MWArray, which has the following
subclass es:
MWNumericArray
MWLogicalArray
MWCharArray
MWCellArray
MWStructArray
These subclasses provide constructors and factory methods for creating n ew
MATLAB arrays from standard Java types and objects. You can use these
MATLAB arrays as argu m en ts in me tho d calls.
Note To improve performance, MWArrays are designed so that they cannot be
resized or reshaped once they are created.
Understanding the MWArray Base Class
MWArray stores a reference to a native MATLAB array and provides a set of
methods for accessing the array’s properties and data.
MWArray also provides
methods for converting the MATLAB array to standard Java types from the
outputsofaJavaclassmethodcall.
Accessing Elements of the Arrays
You cannot access the underlying MATLAB array’s data buffers directly.
Instead use
set and get methods to retrieve or modify an element of the
array. The
set and get m ethods support simple indexing through a single
subscript (value at offset) or you can supply an array of
int representing the
indices of the requested value. In the case of structure arrays, i ndexing by
fieldnameisalsosupported.
4-2
Vue de la page 77
1 2 ... 73 74 75 76 77 78 79 80 81 82 83 ... 291 292

Commentaires sur ces manuels

Pas de commentaire