MATLAB BUILDER EX 1 Guide de l'utilisateur Page 149

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 164
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 148
Utility Library Classes
Sub Clone(ppSparse As MWSparse)
Creates a copy of an MWSparse object.
Parameters.
Argument Type Description
ppSparse MWSparse
Referencetoan
uninitialized
MWSparse
object to receive the
copy
Return Value. None.
Remarks.
Clone allocates a new MWSparse object and creates a deep copy
of the o bject’s contents. Call this function when a separate object is required
instead of a shared copy of an existing o bject refere nce.
Example. The following Visual Basic sample creates a 5-by-5 tridiagonal
sparse array with the following entries:
X=[2-1 0 0 0
-1 2 -1 0 0
0-12-1 0
00-1 2-1
000-1 2]
Sub foo()
Dim x As MWSparse
Dim rows(1 To 13) As Long
Dim cols(1 To 13) As Long
Dim vals(1 To 13) As Double
Dim I As Long, K As Long
On Error GoTo Handle_Error
K=1
ForI=1To4
rows(K) = I
cols(K) = I + 1
C-29
Vue de la page 148
1 2 ... 144 145 146 147 148 149 150 151 152 153 154 ... 163 164

Commentaires sur ces manuels

Pas de commentaire