MATLAB to C
MATLAB to C
(OP)
I'd like to know how my "file.m" could be useful in a C program; the file.m should return a "file.txt" a number of times equal to a defined value in a "for" loop in the C code.
Example:
output=0;
for(i=0;i<3;i++)
{
result=call to function MATLAB(output);
output=function C(result);
}
I hope to be clear; thank you for your kind answers!
Example:
output=0;
for(i=0;i<3;i++)
{
result=call to function MATLAB(output);
output=function C(result);
}
I hope to be clear; thank you for your kind answers!





RE: MATLAB to C
There is no easy way to do it.
1) There is something called 'engine' that enables to slave MATLAB to other applications. I have no experience with that.
2) If you can reverse the problem to call the C program from Matlab then you can
compile it as 'mex' file that you call from MATLAB. In order to do it you have to setup
some files in MATLAB /bin directory to make the right link to your C compiler and then use the 'mex' command from within MATLAB. (>> help mex)
3) Finally for MATLAB 5.3 and higher you can us activeX control. Again I have no experience with it.
Joe
http://www.geocities.com/bstex2001