Calling Matlab functions using C#

A

Ajith Menon

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
 
A

Ajith Menon


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
 
S

Stefan Hoffmann

hi Ajith,

Ajith said:
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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top