### Runing a Matlab function within an add-in

Posted:

**Sun Oct 19, 2014 7:38 am**Hi,

I want to use the COM capabilities that EViews has with Matlab from an add-in. More specifically, I want to install a matlab function m file in the add-in's directory such that I can 'xrun' it when the add-in is in use. My problem is that I can 'xrun' it only if I know where the m file is at (unless the add-ins direcory is in matlab's path) - a problem since the add-in's path varies with each end-user. Any way I can overcome this?

I want to use the COM capabilities that EViews has with Matlab from an add-in. More specifically, I want to install a matlab function m file in the add-in's directory such that I can 'xrun' it when the add-in is in use. My problem is that I can 'xrun' it only if I know where the m file is at (unless the add-ins direcory is in matlab's path) - a problem since the add-in's path varies with each end-user. Any way I can overcome this?