MATLAB BUILDER JA 2 Guide de l'utilisateur Page 220

  • 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 219
4 Using MWArra y Classes
System.out.println("Data read from cell array C: \n");
MWArray[] x = (MWArray[]) C.getData();
for (int i = 0; i < x.length; i++)
System.out.println(x[i]);
System.out.println();
When run, the example displays this output:
Data read from cell array C:
0
0
0
set. This method replaces the element at the specified one-base d offset in this
array with t he specified element. The
set m ethod of MWCellArray overrides
the
set method of class MWArray.
To get the element at a specific index, use one of the following:
public void set(int index, Object element)
public void set(int[] index, Object 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.
Input Parameters
element
New element to replace at index
If
element is of type MWArray,thecellatindex is set to a shared copy of the
underlying MATLAB array. Otherwise, a new MATLAB array is created from
element using d efault conversion rules and assigned to the cell at index.
4-144
Vue de la page 219
1 2 ... 215 216 217 218 219 220 221 222 223 224 225 ... 291 292

Commentaires sur ces manuels

Pas de commentaire