MATLAB BUILDER EX 1 Betriebsanweisung Seite 142

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 164
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 141
C Utility Library
Example. The next Visual Basic code sample illustrates how to a ccess a
two-dimensional structure array’s fields when the field names and dimension
sizes are not known in advance:
Sub foo ()
Dim x As MWStruct
Dim Dims as Variant
Dim FieldNames As Variant
On Error Goto Handle_Error
'
'... Call a method that returns an MWStruct in x
'
Dims = x.Dims
FieldNames = x.FieldNames
For I From 1 To Dims(1)
For J From 1 To Dims(2)
For K From 1 To x.NumberOfFields
y = x(I,J,FieldNames(K))
' ... Do something with y
Next
Next
Next
Exit Sub
Handle_Error:
MsgBox(Err.Description)
End Sub
SubClone(ppStructAsMWStruct)
Creates a copy of an MWStruct object.
C-22
Seitenansicht 141
1 2 ... 137 138 139 140 141 142 143 144 145 146 147 ... 163 164

Kommentare zu diesen Handbüchern

Keine Kommentare