Output the matrix to a comma separated file and let matlab read the file. You can generate the .m file dynamically from vb to get more flexiblity if necessary. You can also call matlab from vb and return to vb after the matlab job is done using the WaitForSingleObject API (e.g. for cleaning up files).
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
Yes this is the method thank you, could you help me out with some code? I mean how to generate the .m file in VB do I have to make a .dll file? And how does this calling from matlab and returning the result go?
I don't have matlab so I can't test any examples for you.
Use the open and print statements in VB to make a new .m file.
Call matlab with the file as parameter. See faq222-428 on how to make VB wait until the process is finished.
You'll have to make the .m file so that the output is saved to a file and then read the file from VB if you want to retrun a result.
Why do you use VB? Can't you just use matlab or C++, which integrates much better with Matlab?
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.