MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guide de l'utilisateur Page 338

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 354
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 337
mwArray operator()(mwIndex i1, mwIndex i2,
mwIndex i3, ..., )
Purpose Return single element at specified 1-based index
C++
Syntax
#include "mclcppclass. h"
double data[4] = {1.0, 2.0, 3.0, 4.0};
double x;
mwArray a(2, 2, mxDOUBLE_CLASS);
a.SetData(data, 4);
x = a(1,1); // x = 1.0
x = a(1,2); // x = 3.0
x = a(2,2); // x = 4.0
Arguments i1, i2, i3, ...,
Comma-separated list o f input indices
Return
Value
An mwArray containing the value at the specified index.
Description Use this operator to fetch a single element at a specified index.
The index is passe d as a comma-separated list of 1-based indices.
This operator is overloaded to support 1 through 3 2 indices. T he
valid number of indices that can be passed in is either 1 (single
subscript indexing), in which case the element at the specified
1-based o ffset is returned, accessing data in column-wise order, or
NumberOfDimensions() (mul tiple subscript indexing), in which cas e,
the index list is used to access the specified element. The valid range
for indices is
1 <= index <= NumberOfElements(), for single subscript
indexing. For multiple subscript indexing, the ith index has the
valid range:
1 <= index[i] <= GetDimensions().Get(1, i).An
mwException is thrown if an invalid number of indices is passed in
or if any index is out of bounds.
C-84
Vue de la page 337
1 2 ... 333 334 335 336 337 338 339 340 341 342 343 ... 353 354

Commentaires sur ces manuels

Pas de commentaire