Matlab function called from MS Word VBA

조회 수: 3 (최근 30일)
Derek Abeyta
Derek Abeyta 2012년 11월 12일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Export to MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by