Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB Builder NE   

Matrix Math Example (Visual Basic)

To create the component for this example, see the first few steps in Matrix Math Example. Then create a Microsoft Visual Basic application as follows.

  1. Review the sample application for this example in:

    matlabroot\toolbox\dotnetbuilder\Examples\VS8\NET\MatrixMathExample
    \MatrixMathVBApp\MatrixMathApp.vb
    .

    The program listing is shown here.

     MatrixMathApp.vb

    The statement

    Dim factor As Factor = New Factor

    creates an instance of the class Factor.

    The following statements call the methods that encapsulate the MATLAB functions:

    argOut = factor.cholesky(matrix)
    
       
    argsOut = factor.ludecomp(2, matrix)
    
    ...
    argsOut = factor.qrdecomp(2, matrix)

  2. Build the MatrixMathApp application using Visual Studio .NET.

    1. The MatrixMathVBApp folder contains a Visual Studio .NET project file for this example. Open the project in Visual Studio .NET by double-clicking MatrixMathVBApp.vbproj in Windows Explorer. You can also open it from the MATLAB desktop by right-clicking MatrixMathVBApp.vbproj > Open Outside MATLAB.

    2. Add a reference to the MWArray component, which is matlabroot\toolbox\dotnetbuilder\bin\architecture\framework_version
      \mwarray.dll.

    3. If necessary, add (or update the location of) a reference to the MatrixMathComp component which you built in a previous step. (The component, MatrixMathComp.dll, is in the \MatrixMathExample\MatrixMathComp\x86\V2.0\Debug\distrib subfolder of your work area.)

  3. Build and run the application in Visual Studio .NET.

  


Recommended Products

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