Complementarity: Comparison of interface between Simulink and vc++6.0

Source: Internet
Author: User
Tags exit command line comparison expression header

Simulink and VC application interface a significant feature is that simulink simulation must rely on the MATLAB system, so far, MATLAB provides the engine way to the Simulink and VC application programming combined. To be through the engine way will simulink and VC combination of the first to master VC and MATLAB through the engine mode of mixed programming and Simulink command line simulation two aspects of the content.

MATLAB engine mode function library

MATLAB engine function library is MATLAB provides the engine way interface of a series of programs, it allows users to use their own C/s + + language or FORTRAN application of MATLAB to invoke, Matlab as a computing engine to use, let it run in the background, Complete the complex matrix computation, simplifies the front desk user program design the task.

When the user starts the MATLAB engine, quite has started another MATLAB process and runs in the background. The application through the MATLAB Engine function library provides the function to carry on the data exchange and the command transmission between MATLAB engine and the task. MATLAB Engine function Library provides a total of 13 C language engine functions, they are all in the header file engine. h, so that header file must be included when you use them. The following is a brief description of the six basic library functions in the engine library:

(1) Engopen

function: Start the MATLAB engine.

Syntax: engine* engopen (const char* startcmd);

Where the Startcmd is a string used to start the MATLAB process. In Windows, Startcmd must be null.

(2) Engclose

function: Exit MATLAB engine.

Syntax: int engclose (engine* EP);

Wherein, the EP is a engine type of pointer. Engclose issued to exit the MATLAB command, the success of the return of 0, otherwise return L.

(3) engevalstring

Function: Executes a MATLAB expression in string representation.

Syntax: int engevalstring (engine* EP, const char* string);

Where string is the command string, the string must be a valid MATLAB expression. Any commands that can be executed in the MATLAB command window can be executed in string form.

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.