Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2006, 01:14 AM
Authorized User
 
Join Date: Nov 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to karveajit
Default Problem with executing MATLAB command from c#

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???






Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with executing some command on explorer 6+ Kayodeog BOOK: Beginning JavaScript 3rd Ed. ISBN: 978-0-470-05151-1 0 October 9th, 2008 08:08 AM
Executing Saxon from de Command Line Tomi XSLT 2 December 13th, 2007 04:58 AM
executing external command from XSLT kapy_kal XSLT 4 June 9th, 2006 11:26 AM
executing command on remote machine safknw Visual Studio 2005 2 July 3rd, 2005 06:38 AM
executing sql command redface Crystal Reports 0 April 6th, 2005 05:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.