MATLAB BUILDER JA 2 Guide de l'utilisateur Page 152

  • 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 151
4 Using MWArra y Classes
ThefollowingsyntaxappliestoalltheabovemethodsexceptgetData and
toArray.
Calling Sy n ta x. To get the element at a specific index, use one of the
following:
public type getType(int index)
public
type getType(int[] index)
To set the element at a specific index, use one of the following:
public void set(int index, type element)
public void set(int[] index,
type element)
Use the first syntax (int index) to return the ele ment at the specified
one-based offset in the a rray, accessing elements in column-wise order. Us e the
second syntax (
int[] index) to return the element at the specified array of
one-based indices. The first syntax offers better performance than the second.
In the case where
index is of type int, the valid range for index is 1<=index
<= N
,whereN is the total number of elements in the array.
Inthecasewhere
index is of type int[],eachelementoftheindex vector
is an index along one dimension of the
MWNumericArray object. The valid
range for any index is
1 <= index[i] <= N[i],whereN[i] is the size of the
ith dimension.
Exceptions. The
MWNumericArray constructor throws the following exception:
IndexOutOfBoundsException
The specified index parameter is invalid.
get.
MWNumericArray inherits this method from the MWArray class.
getData.
MWNumericArray inherits this method from the MWArray class.
getDouble. This method returns the real part of the
MWNumericArray
element located at the specified one-based index or index array. The return
value is given type
double.
4-76
Vue de la page 151
1 2 ... 147 148 149 150 151 152 153 154 155 156 157 ... 291 292

Commentaires sur ces manuels

Pas de commentaire