By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,563 Members | 1,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,563 IT Pros & Developers. It's quick & easy.

Calling Matlab functions using C#

P: n/a
Do any body know how to use the functions available in the MATLAB
using C#?

( To be specific, functions COHERE used to find Coherence and TFE to
calculate Transfer function are needed. These functions are available
in the MATLAB SP toolbox)

These functions require input waveforms X and Y, which is nothing but
two array of samples (datatype=double).

So the operations required are:
1) I have to call and/or initialize MATLAB from windows form
created using C#.
2) Then pass the two array to MATLAB.
3) Get back a array of samples from MATLAB.
4) Then use this array for my calculations.

I have heard about some Matlab API's, can any one help me use those
from C#.

Preferably a non-COM solution as I am not very good with COM. Also
preferred if the solution does not require me to buy any MATLAB
solutions. I have MATLAB dll's available with me but not its IDE.

Can any body help me get the code to do this? Any comments are welcome

Regards,
Ajith

Mar 5 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
hi Ajith,

Ajith Menon wrote:
Do any body know how to use the functions available in the MATLAB
using C#?
http://www.codeproject.com/dotnet/matlabeng.asp
mfG
--stefan <--
Mar 5 '07 #2

P: n/a
On Mar 5, 3:08 pm, Stefan Hoffmann <ste...@ste5an.dewrote:
http://www.codeproject.com/dotnet/matlabeng.asp

mfG
--stefan <--
Hi Stefan,

I have seen this article. But it does not for me.

I am unable to start Matlab engine and also does not work the
CreateObject("Matlab.Application","");

I think may be because Matlab engine comes with the complete package
i.e. with Matlab IDE. But I just have MATLAB Component Runtime. So I
dont know if that is enough to solve my problem.

Regards,
Ajith


Mar 5 '07 #3

P: n/a
hi Ajith,

Ajith Menon wrote:
I think may be because Matlab engine comes with the complete package
i.e. with Matlab IDE. But I just have MATLAB Component Runtime. So I
dont know if that is enough to solve my problem.
Ask the guys from www.mathworks.com.

mfG
--stefan <--
Mar 5 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.