Advertisement

02.18.2008 at 07:17AM PST, ID: 23171511
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

integrate matlab in c#

I have developed many image processing functions in matlab..
I wanna integrate matlab in c# so I can use the functions that I have developed in matlab in c#.
any ideas how to do this ( or snippet code )  ?
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: Ameerh24
Solution Provided By: jaime_olivares
Participating Experts: 1
Solution Grade: C
Views: 79
Translate:
Loading Advertisement...
02.18.2008 at 07:20AM PST, ID: 20920543

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.18.2008 at 07:32AM PST, ID: 20920672

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.18.2008 at 09:56AM PST, ID: 20921990

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.18.2008 at 10:01AM PST, ID: 20922034

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.18.2008 at 01:11PM PST, ID: 20923476

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.18.2008 at 01:23PM PST, ID: 20923566

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.18.2008 at 01:35PM PST, ID: 20923689

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.20.2008 at 11:22AM PST, ID: 20940885

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.20.2008 at 01:58PM PST, ID: 20942415

Rank: Wizard

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • Automotive
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Displays / Monitors
  • Handhelds / PDAs
  • Components
  • Peripherals
  • Laptops/Notebooks
  • Servers
  • Misc
  • Apple
  • Embedded Hardware
  • Networking Hardware
  • Storage
  • Desktops
  • New Users
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMware
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Virtualization
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • Web Computing
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Consulting
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMware
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Automation
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Web Services
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Web Computing
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Lounge
  • Business Travel
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
  • Automotive
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
02.18.2008 at 07:20AM PST, ID: 20920543
or can I write matlab code in C#.net environment ?
 
02.18.2008 at 07:32AM PST, ID: 20920672

Rank: Wizard

You can't write matlab code in C#.net environment. I look at this issue frequently in my work.
Matlab is a modeling tool, not an implementation tool. Once you have tested your model, you have to rewrite your code in your desired implementation language (like C#)
Also you can use the Matlab compiler (mcc) to translate to C language, so it will be easier to translate to C#.
Have a look to: http://www.mathworks.com/access/helpdesk_r13/help/toolbox/compiler/appaqui2.html
 
02.18.2008 at 09:56AM PST, ID: 20921990
thanks jaime_olivares,
but can you please publish the article of that link somewhere else or as attachment here ?
because, when I tries to open the link, it gives me access is denied.
thanks in advance.
 
02.18.2008 at 10:01AM PST, ID: 20922034

Rank: Wizard

try with http://www.mathworks.com/access/helpdesk_r13/help/toolbox/compiler/compiler.html

From matlab site:
"MATLAB Compiler can generate these kinds of source code:
C source code for building MEX-files.
C or C++ source code for combining with other modules to form stand-alone applications. Stand-alone applications do not require MATLAB at run-time; they can run even if MATLAB is not installed on the end-user's system.
C code S-functions for use with Simulink®.
C shared libraries (dynamically linked libraries, or DLLs, on Microsoft Windows) and C++ static libraries. These can be used without MATLAB on the end-user's system.
Excel compatible plug-ins
COM (Component Object Model) objects. "
 
02.18.2008 at 01:11PM PST, ID: 20923476
isn't there any other website ?
it seems the whole website of that link is unable to be accessed!!!!
plzz help !!
 
02.18.2008 at 01:23PM PST, ID: 20923566
it says :
You don't have permission to access "http://www.mathworks.com/access/helpdesk_r13/help/toolbox/compiler/compiler.html" on this server.

Reference #18.714dd58.1203368839.21c691cd
 
02.18.2008 at 01:35PM PST, ID: 20923689

Rank: Wizard

well, you have a problem, go to a cybercafe.
this is the official matlab site.
 
02.20.2008 at 11:22AM PST, ID: 20940885
thanks jaime_olivares, I have grant access but I get an error when I was trying to build a C# library :

Build output( 2008-02-20 21:11:58).

mcc -F 'C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1.prj'

mcc -W lib:untitled1 -d C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src -T link:lib -v C:\Documents and Settings\KDJD\My Documents\MATLAB\timestwo.m
mcc -W lib:untitled1 -d C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src -T link:lib -v C:\Documents and Settings\KDJD\My Documents\MATLAB\timestwo.m  
Compiler version: 4.6 (R2007a)
Processing F:\MatLab\toolbox\matlab\mcc.enc
Processing F:\MatLab\toolbox\database\mcc.enc
Processing include files...
2 item(s) added.
Processing directories installed with MCR...
The file C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\mccExcludedFiles.log contains a list of functions excluded from the CTF archive.
2 item(s) added.
Generating MATLAB path for the compiled application...
Created 37 path items.
Begin validation of MEX files: Wed Feb 20 21:14:01 2008
Validating 'F:\MatLab\toolbox\compiler\deploy\deploywhich.mexw32'.
No conflicting M-file found.
Validating 'F:\MatLab\toolbox\compiler\deploy\readline.mexw32'.
No conflicting M-file found.
End validation of MEX files: Wed Feb 20 21:14:01 2008
Deleting 2 temporary MEX authorization files.
Removing: 'C:\DOCUME~1\KDJD\LOCALS~1\Temp\mathworks_tmp_11722_5568.auth'.
Removing: 'C:\DOCUME~1\KDJD\LOCALS~1\Temp\mathworks_tmp_8257_5568.auth'.
Parsing file "C:\Documents and Settings\KDJD\My Documents\MATLAB\timestwo.m"
      (Referenced from: "Compiler Command Line").
Parsing file "F:\MatLab\toolbox\compiler\deploy\matlabrc.m"
      (Referenced from: "Compiler Command Line").
Parsing file "F:\MatLab\toolbox\compiler\dirname.m"
      (Referenced from: "Compiler Command Line").
Parsing file "F:\MatLab\toolbox\compiler\deploy\deployprint.m"
      (Referenced from: "Compiler Command Line").
Parsing file "F:\MatLab\toolbox\compiler\deploy\printdlg.m"
      (Referenced from: "Compiler Command Line").
Parsing file "F:\MatLab\toolbox\matlab\iofun\filesep.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\compiler\deploy\hgrc.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\codetools\initdesktoputils.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\local\initprefs.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\general\isdeployed.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\general\ispc.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\lang\lasterror.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\local\pathdef.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\general\pwd.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\general\recycle.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\local\reporterrorlogs.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\strfun\str2double.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\general\usejava.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\matlabrc.m").
Parsing file "F:\MatLab\toolbox\matlab\iofun\fileparts.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\dirname.m").
Parsing file "F:\MatLab\toolbox\matlab\timefun\datestr.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\graphics\getappdata.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\datatypes\isfield.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\uitools\msgbox.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\timefun\now.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\datatypes\num2cell.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\strfun\num2str.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\graphics\orient.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\graphics\print.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\strfun\str2num.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\iofun\tempname.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\deployprint.m").
Parsing file "F:\MatLab\toolbox\matlab\general\path.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\printdlg.m").
Parsing file "F:\MatLab\toolbox\matlab\general\rmpath.m"
      (Referenced from: "F:\MatLab\toolbox\compiler\deploy\printdlg.m").
Generating file "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.h".
Generating file "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.c".
Generating file "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.exports".
Generating file "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\readme.txt".
Generating file "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1_mcc_component_data.c".
Executing command: mbuild -O -v -output "untitled1" -I"C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src" "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.c" "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.exports" "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1_mcc_component_data.c" -link shared -outdir "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src"
 This is mbuild Copyright 1984-2006 The MathWorks, Inc.
 
-> Default options filename found in C:\Documents and Settings\KDJD\Application Data\MathWorks\MATLAB\R2007a
----------------------------------------------------------------
->    Options file           = C:\Documents and Settings\KDJD\Application Data\MathWorks\MATLAB\R2007a\compopts.bat
->    COMPILER               = cl
->    Compiler flags:
         COMPFLAGS           = -c -Zp8 -G5 -GX -W3 -nologo -I"F:\MatLab\extern\include\win32" -DMSVC -DIBMPC -DMSWIND
         OPTIMFLAGS          = -O2 -DNDEBUG
         DEBUGFLAGS          = -Zi -Fd"C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.pdb"
         arguments           =  "-IC:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src"
         Name switch         = /Fo
->    Pre-linking commands   =  
->    LINKER                 = link
->    Link directives:
         LINKFLAGS           =  kernel32.lib user32.lib gdi32.lib advapi32.lib oleaut32.lib ole32.lib /LIBPATH:"F:\MatLab\extern\lib\win32\microsoft" /nologo mclmcrrt.lib /dll /implib:"C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.lib" /def:C:\DOCUME~1\KDJD\LOCALS~1\Temp\mbuild_B4901609-2696-4E34-749B-36E45182974A\templib.def
         LINKFLAGSPOST       =  
         Name directive      = "/out:C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\untitled1.dll"
         File link directive =  
         Lib. link directive =  
         Rsp file indicator  = @
->    Resource Compiler      = rc /fo "C:\Documents and Settings\KDJD\My Documents\MATLAB\untitled1\src\.res"
->    Resource Linker        =  
----------------------------------------------------------------
 
  Could not find the compiler "cl" on the DOS path.
  Use mbuild -setup to configure your environment properly.
 
 
  F:\MATLAB\BIN\MEX.PL: Error: Unable to locate compiler.
 
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable.
??? Error executing mcc, return status = 1.



There were errors during compilation process.
 
02.20.2008 at 01:58PM PST, ID: 20942415

Rank: Wizard

Well, I am not a Matlab guru. Appears to be is a configuration problem, matlab is trying to locate a C++ compiler. Have a look to this article for more tips: http://www.codeproject.com/KB/cpp/mexFunction.aspx?df=100&forumid=23357&exp=0&select=1859439
and look at article comments below.

Accepted Solution
 
 
02.21.2008 at 02:16PM PST, ID: 20952457
I have look to the article I helps for C++ compiler, It works for C++ but not for C#
 
 
02.23.2008 at 01:04PM PST, ID: 20966701
yes, thats true, but it is far easier to convert from C++ to c# than mathlab to c#
 
 
 
20080716-EE-VQP-33 / EE_QW_EXPERT_20070906