MATLAB BUILDER EX 1 Guide de l'utilisateur Page 151

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 182
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 150
Utility Library Classes
D-7
Return Value. None.
Remarks. This function can process a Variant array in one single call or
through multiple calls using the
nStartAt parameter.
Example. This example uses MWUnpack to process a varargout cell into several
Excel ranges, while auto-resizing each range. The
varargout parameter is
supplied from a method that has been compiled from the MATLAB function.
function varargout = randvectors
for i=1:nargout
varargout{i} = rand(i,1);
end
This function produces a sequence of nargout random column vectors, with the
length of the ith vector equal to i. Assume that this function is included in a
class named
myclass that is included in a component named mycomponent with
a version of 1.0. The Visual Basic subroutine takes no arguments and places
the results into Excel columns starting at A1, B1, C1, and D1. If an error
occurs, a message box displays the error text. This function assumes that
MWInitApplication has been previously called.
Sub GenVectors()
Dim aClass As Object
bAutoResize Boolean
Optional auto-resize flag. If this
flag is
True, any Excel range
output arguments are resized to
fit the dimensions of the
Variant to be copied. The
resizing process is applied
relative to the upper left corner
of the supplied range. Default =
False.
[pVar0],[pVar1], ...
Variant
Optional list of Variants to
receive the array items
contained in
VarArg. From 0 to
32 arguments can be passed.
Argument Type Description
Vue de la page 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 181 182

Commentaires sur ces manuels

Pas de commentaire