MATLAB hybrid programming wizard (VC, VB,. Net ...)

Source: Internet
Author: User
Tags mathematical functions

Sender: xxhn (Hunan), email area: mathtools

Question: MATLAB hybrid programming wizard (VC, VB,. Net ...)

Mailing site: BBS shuimu Tsinghua station (Fri May 23 09:32:12 2003)

1. Mixed compilation of MATLAB and VC

1. Use MCC to convert the M file of MATLAB to CPP, c file or DLL for VC to call:

This implementation recommends methods summarized by zosco and ljw in the serum area (x-6-1-4-3-1 and 2)

VC settings see the essence area x-6-1-4-3-5, through which you can call C math library and C ++

PDF of Math Library, C ++ mathlib In the essence area x-6-1-10

2. Use combuilder of MATLAB to make m Files into COM components for VC to call.

See essence x-6-1-5

3. Use MATCOM:

This Mathworks company is no longer in the new version, and its functions may be replaced by 1st and 2nd methods.

It is recommended to use the first two methods, MATCOM use the essence area has a part, from the x-6-1-4 to find

2. MATLAB and VB mixed editing

1. Mathworks developed a COM component specifically for VB: matrixvb, which contains a large number of mathematical functions.

This component needs to be installed separately, please download on the installation disk or online, registration code see essence area x-6-1-3-8

After this component is installed, it comes with two PDF files. The usage and functions that can be used are all on it. We recommend that you read this article.

The two PDF files, the verbose location is x-6-1-4-6

2. Use combuilder of MATLAB to make m Files into COM components for VB to call.

See essence x-6-1-5

3. MATLAB and. Net mixed editing

This issue has not been discussed before version 6.1. It should be possible to compile a DLL or CPP file with MCC, because

. NET is very convenient to call COM components. It is recommended to use combuilder of MATLAB to make m Files into COM components

. Net call, see the essence area x-6-1-5

4. Try to use the combuilder of MATLAB to make the COM component to achieve mixed editing. This is also the Mathworks company.

The recommended method is not limited by the language and compiler. I believe that the higher version of MATLAB will have greater improvements in this regard.

For this introduction, see the essence area x-6-1-5

5. other languages or compilers mixed with MATLAB

There are some related Introduction In the essence area x-6-1-4, incomplete, please also use the hero summary of this content.

If the compiler can call the COM component, the M file can also be made into a COM component through the combuilder of Matlab,

Methods for them to call

6. MATLAB calls external DLL (Dynamic Link Library, etc)

See essence x-6-1-4-9

VII. FAQs about mixed editing

1. the following error message (for example) is displayed when the MCC compiles the M file ):

Error: file "psf3" is a script M-file and cannot be compiled with

Current compiler.

MATLAB complier cannot compile script M-file. Convert script M-file to function M-file.

The simplest method is: If your M file is named A.M, add function a to the beginning.

Recommended serum x-6-1-4-12 article

2. mxarray, mwarray to double or another type

See essence x-6-1-4-3-7 and 8

3. Some functions in toolbox can be called in VC.

See the essence of x-6-1-4-3-9, this problem has not been a good solution

4. lib/DEF: libmmfile. DEF/out: libmmfile. lib/machine: ix86?

This is to use the C ++ compiler lib.exe to export the Lib file from the def file to call the DLL.

This is a command line in DOS. The later version of MATLAB does not need to be used. All its lib files are in

<MATLAB root>/extern/lib/Win32, the folder contains

Folder.

5. I chose to create a MATLAB project in VC, but a window always pops up when the last step is determined.

Msdev. EXE application error. "0x528aa3003 command"

The referenced "0x52880000" memory. The memory cannot be "written"?

In this case, the addin of MATLAB cannot be used, and there is no good solution. Therefore, only MCC can be used.

To replace addin.

6. How can I run the EXE file generated in MATLAB on a machine without Matlab?

See essence x-6-1-8

--

Come on, baby!


※Modification: · xxhn modified this article at 20:03:05 on May 26. [from: 202.113.40.222]

※Modification: · xxhn modified this article at Jun 13 19:07:26 · [from: 202.113.35.162]

※Modification: · xxhn modified this article at Jun 20 09:37:24 · [from: 202.113.38.250]

※Modification: · xxhn modified this article at Jun 28 12:48:42 · [from: 202.113.41.0]

※Source: · BBS shuimu Tsinghua station smth.org · [from: 202.113.35.191]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.