# How to call a Matlab user-created function in a .m file from Mathematica?

I have a file called gensys.m where it's defined a function gensys, which I would like to call in the mathematica environment and work with it.

I've tried to download MatLink, but it doesn't seem to work... It seems to need MatLab which I don't have...

Assuming I had Matlab, is the best way to work with the function gensys, through MatLink?

Any help would be appreciated.

• Best way would be indeed to use MatLink. Of course MatLab is mandatory. Most MatLab code can also be executed with the free Octave interpreter. Unfortunately, MatLink cannot be used with Octave; the developers refrained from doing so for licence reasons. If the code is not too long and does not involve exotic libraries, the simplest way would be to translate it by hand. – Henrik Schumacher May 29 '18 at 9:53
• @HenrikSchumacher Thanks for the comment ;) – An old man in the sea. May 29 '18 at 10:02