MATLAB's GUI functionality
Many heroes are reluctant to see the commonly used DOS-Windows interface (command line), so use the MATLAB tape GUI generating tool, but the controls and event processing provided by MATLAB are limited. After the GUI interface is done, in the machine, the GUI interface is placed in the machine, showing off the brothers who have not entered the laboratory, and barely increase some charm value.
But I still have to talk about the GUI program, after all, this visual interface operation is the trend of the times. The essential purpose of the GUI program design using Matlab is to provide the most convenient interaction. There are many mixed language programming very disgusted, maybe it feels that there will be a monster, but if the result of the combination is a very beautiful art, it should not exclude the combination of the combination. For MATLAB, implement MATLAB and VC or BC or C Builder interaction, improve speed, beautify interface, so that the program is more in line with Windows specification, and uses MATLAB's powerful features, for anyone. It is very meaningful.
First, use the MATLAB to enter Guide, enter Guide, run the GUI interface design tool, so that the system will automatically generate .fig and .m files, as our usual interface resource file and background code file, code about the event processing Written in .m. These help from matlab should be very easy to learn.
Secondly, other visual development tools, such as VC , operate MATLAB with C (or C) language, there are three ways:
· MEX file
The C or Fortran language program that can be called in Matlab is called the MEX file. MATLAB can directly treat the MEX file as its built-in function to call. The MEX file is a subroutine of dynamic link DL, and the MATLAB interpreter can automatically load and execute it. The MEX file has the following uses:
For a large number of existing C or Fortran programs, there is no need to rewrite Matlab-specific M file formats in MATLAB.
For those algorithms that are too slow, it can be written in C or Frotran language to improve efficiency, which is significant in efficiency improvements.
· MAT file application
The MAT file is a data file format for the MATLAB-specific for saving data to disk and imports data from Matlab. The MAT file provides a simple mechanism that allows you to move data in a flexible manner between the two platforms. Moreover, it also provides a way to import or export data to other single MATLAB applications.
To simplify the use of the MAT file outside the MATLAB environment, MATLAB gives an operation routine library. With it, we can read and write the MAT file using the C / C or Fortran program.
· Engine application
MATLAB provides a series of routines that make other programs can call Matlab to use MATLAB as a computing engine. The MATLAB engine program refers to the C / C or Fortran program that communicates with the stand-alone Matlab process through the pipe (in the Unix system) or ActiveX (in the Windows system), which is the strongest, which is the strongest, but passed Open interface allows the external program to manage the establishment, call, close, etc. of the MATLAB process.
MATLAB also provides a library to start or end the MATLAB process, exchange data with MATLAB, and send the matlab command.
......
To implement the establishment of the executable, for MATLAB, some difficulties can compile the program as a .exe file with the VC or other powerful compiler, and consider whether there is a MATLAB installation in the execution environment. One can refer to the paper
http://www.simwe.com/jour/prog/p001008.htm January 6, 2005