| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB Builder NE |
| Contents | Index |
| Learn more about MATLAB Builder NE |
To create the component for this example, see Passing Variable Arguments. Then create a Microsoft Visual Basic application as follows:
Review the sample application for this example in matlabroot\toolbox\dotnetbuilder\Examples\VS8\NET\VarArgExample
\VarArgVBApp\VarArgApp.vb.
The program listing is shown here.
The program does the following:
Initializes three arrays (colorSpec, data, and coords) using the MWArray class library
Creates a Plotter object
Calls the extracoords and drawgraph methods
Uses MWNumericArray to handle the data needed by the methods
Note For complete reference information about the MWArray class hierarchy, see the MWArray Class Library Reference (available online only). |
Uses a try-catch-finally block to catch and handle any exceptions
The following statements are alternative ways to call the drawgraph method:
data = CType(plotter.drawgraph(colorSpec, coords(0), coords(1), coords(2), coords(3), coords(4)), MWNumericArray) ... data = CType(plotter.drawgraph(colorSpec, coords), MWNumericArray)
Build the VarArgApp application using Visual Studio .NET.
The VarArgVBApp folder contains a Visual Studio .NET project file for this example. Open the project in Visual Studio .NET by double-clicking VarArgVBApp.vbproj in Windows Explorer. You can also open it from the MATLAB desktop by right-clicking VarArgVBApp.vbproj > Open Outside MATLAB.
Add a reference to the MWArray component,
which is matlabroot\toolbox\dotnetbuilder\bin\architecture\framework_version
\mwarray.dll.
If necessary, add (or update the location of) a reference to the VarArgComp component which you built in a previous step. (The component, VarArgComp.dll, is in the \VarArgExample\VarArgComp\x86\V2.0\Debug\distrib subfolder of your work area.)
Build and run the application in Visual Studio .NET.
![]() | Create Plot Example (Visual Basic) | Spectral Analysis Example (Visual Basic) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |