In the current schematic of mine, in which directory should I put the *.m files?

When I created the Matlab cosimulation, I put it in the directory of "C:\users\default\adsptolemy\src\matlabipimport\matlab" and it has already been available in the left palette under "Numeric Matlab".

When I started up the simulation, it has the following errors:

"Could not load matlab library libeng"

and

"MatlabLibLink'M1':Please make sure Matlab is correctly installed".

Hope for help. 3X!

When I created the Matlab cosimulation, I put it in the directory of "C:\users\default\adsptolemy\src\matlabipimport\matlab" and it has already been available in the left palette under "Numeric Matlab".

When I started up the simulation, it has the following errors:

"Could not load matlab library libeng"

and

"MatlabLibLink'M1':Please make sure Matlab is correctly installed".

Hope for help. 3X!

If you're running on 64-bit Windows you need to use ADS 2008 Update 1 as previous ADS versions do not support 64-bit MATLAB cosimulation. Alternatively, you can install 32-bit MATLAB (the default MATLAB installation on 64-bit Windows is 64-bit; to install 32-bit MATLAB you need to run the 32-bit MATLAB installer manually). However, the MATLAB compiler won't work in the 32-bit mode on 64-bit Windows. Which is fine, because the script mode performance is equivalent to the compiled performance in the new MATLAB releases (a compiled MATLAB program today is just a wrapper around the regular interpreter).

If you're on 32-bit Windows, then you need to configure the system. Again, ADS 2008 Update 1 makes things easier, but if you're using an older version you need to make sure you have MATLAB in the system path and the MATLAB COM server is properly registered.

To place MATLAB in the system path, open the Windows Control Panel, System, Advanced tab; click on Environment Variables and add <matlab root>\bin\win32 to the PATH, where <matlab root> is the MATLAB home directory, e.g. C:\Program Files\MATLAB\R2007a. If you have multiple versions of MATLAB, make sure the path to the one you want to use in the simulation comes first. ADS 2008 Update 1 takes care of this step automatically.

To register the MATLAB COM server, open Windows Command Prompt and run the command matlab /regserver.

Finally, to answer your first question, the .m files are expected to be in the data folder of your ADS project.