Back in 1993, I sent a suggestion to MathWorks for improving the useability of MEX functions and S-Functions.
The idea was to provide popup menus that a user would complete to specify the interface between user written FORTRAN or C code and Matlab. For example, the menu would contain fields for the user to type in the names of calling routines and arguments, argument types, etc, for MEX or S-functions.
A similar approach was followed by a product made by Boeing called EASY5. This approach made it very simple to include user written code in their block diagram simulation tool.
I still have not seen anything like this appear in Matlab/Simulink, although I once read that the makers of the NAG scientific library had made such a tool.
Does anybody (including MathWorks) know if such a facility exists in Matlab 5 (or at least is planned as a future improvement)?
I have included my original e-mail suggestion and the MathWorks (John Little) response to it at that time (1993).
<======================= Begin Included Message =======================> From gam Tue Apr 6 14:53:09 1993 Date: Tue, 6 Apr 93 14:53:06 PDT From: gam (Glenn Macala) To: email@example.com Subject: Menus for MEX and S-functions Cc: gam@dvorak
I've used Simulink for quite a while now and find that the MEX file facility and the S-Function facility are both necessary and very difficult to use.
Given your windowing tool facility, it should be easy for Mathworks to provide a USER FRIENDLY menu to fill out when one desires to make a MEX file or an S-function. Then your routines could take the information in these menus and create the MEX or S-function and any necessary interfaces. This bit about writing interfaces between FORTRAN and C programs and Matlab is totally unacceptable.
The main reason for using both Simulink and Matlab is to free the engineer from the details of computer programming and to let him get on with the engineering. Both Matlab and Simulink accomplish a giant step towards this goal EXCEPT when MEX functions or S-functions must be used. Then Matlab and Simulink take a GIANT step backwards toward confusing, tedious programming that has nothing what so ever to do with the engineering design work to be performed.
Please implement this suggestion soon! This problem is really a BIG impediment to using Matlab/Simulink for serious engineering problems.
Glenn A. Macala Guidance & Control Section M.S. 198-326 Jet Propulsion Laboratory 4800 Oak Grove Dr. Pasadena, CA 91109-8099