|
|
| Author |
Message |
Biox ----

Joined: 12 Mar 2010 Posts: 2 Feedback Score: 0
Medals: None
|
Posted: Fri Mar 12, 2010 7:14 am Post subject: Can Matlab compile to a DLL ?
|
|
|
A programmer wrote a module for me in Matlab. He was supposed to then convert it to C++
However he has disappeared.
I have an app written in VB6 that needs to use the Matlab module.
If I can compile the Matlab code to a DLL and call that from VB that would do the trick for me.
Is this possible ? If so I'd appreciate being pointed to some reading material or some assistance.
thanks in advance. |
|
| Back to top |
|
 |
dr3ad ----

Joined: 06 Apr 2010 Posts: 2 Feedback Score: 0
Medals: None
|
Posted: Tue Apr 06, 2010 2:57 am Post subject: solution
|
|
|
if you have a function called
function y=myfunction(x)
[m,n]=size(x);
k=0;
for i=1:n
k=k+x(i);
end
y=k/n;
then
you can got to the command line after saving that fuction and say
mcc -t -L C -W lib:myfunctionLib -T link:lib myfunction.m libmmfile.mlib
hope this helps |
|
| Back to top |
|
 |
Biox ----

Joined: 12 Mar 2010 Posts: 2 Feedback Score: 0
Medals: None
|
Posted: Tue Apr 06, 2010 5:46 am Post subject:
|
|
|
| Thanks for the feedback. |
|
| Back to top |
|
 |
|