MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE Guia do Utilizador Página 306

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 305
mwSize NumberOfNonZeros() const
Purpose Return num ber of nonzero elements for sparse array
C++
Syntax
#include "mclcppclass. h"
mwArray a(2, 2, mxDOUBLE_CLASS);
int n = a.NumberOfNonZeros ();// Should return 4
Arguments None
Return
Value
Actual number of n onzero elements in array.
Description Usethismethodtodeterminethesizeoftheofthearraysdata. If
the underlying array is not sparse, this returns the same value as
NumberOfElements().
Note This meth od does not analyze the actual values of the array
elements. Instead, it returns the number of elements that could
potentially be nonzero. This is exactly the number of elements for which
the sparse m atrix has allocated storage.
C-52
Vista de página 305
1 2 ... 301 302 303 304 305 306 307 308 309 310 311 ... 353 354

Comentários a estes Manuais

Sem comentários