Matlab function called from MS Word VBA

3 vues (au cours des 30 derniers jours)
Derek Abeyta
Derek Abeyta le 12 Nov 2012
I have a MS Word function that needs to run a MATLAB function from a vba script. I am having the .m file stored in a location on computer and need to set the path in matlab to see this file. I am currently using a method of retrieving the full path name from the user so that I can use this file path to set the path in MATLAB. The fullpath name is stored in a variable called SelFile. This is the part of the code that I am struggling with. I would also like to pass parameters from vba to word. This parameter would be called temp. Is there a way to do this?
Set Matlab = CreateObject("MatLab.Desktop.Application")
Call Matlab.Execute(SelFile)
Call Matlab.Execute("My_m_file", Temp)
Thank you,
Derek Abeyta

Réponses (0)

Catégories

En savoir plus sur Data Export to MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by