Hi,
When I open MATLAB 7.1 and issue a command "simulink" on
MATLAB command window, it opens the Simulink Library. But, when I use
Reflection from .NET and try to issue same command it gives error:
Quote:
quote:"Warning: Function c:\\program
files\\matlab71\\bin\\win32\\simulink.dll has the same name as a MATLAB
builtin. We suggest you rename the function to avoid a potential name
conflict.\n> In slcustomize at 30\n In simulinkrc at 35\nMex file
entry point is missing. Please check the (case-sensitive) \nspelling
of mexFunction (for C MEX-files), or the (case-insensitive) \nspelling
of MEXFUNCTION (for FORTRAN MEX-files).\n??? Invalid MEX-file
'c:\\program files\\matlab71\\bin\\win32\\simulink.dll': The specified
module could not be found.\r\n.\n\n"
|
chk out the piece of code:
Code:
using System;
using System.Reflection;
namespace StartMatlab
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
[STAThread]
static void Main(string[] args)
{
Type matlabtype;
matlabtype = Type.GetTypeFromProgID("matlab.application");
object matlab;
matlab = Activator.CreateInstance(matlabtype);
object [] myInput = new Object[] {"simulink"};
object myObj =
matlabtype.InvokeMember("Execute",BindingFlags.InvokeMethod,null,matlab,myIÂnput);
}
}
}
Am I missing something???