# How to automatically load the ToMatlab toolbox when opening the software? [duplicate]

I would like to convert the formula to Matlab, but each time I want to run the ToMatlab file, is there any way to automatically load the ToMatlab component when launching the software?

• Just add Needs["ToMatlab"] to your Init.m file. – Henrik Schumacher Jun 23 '18 at 12:39
• I put the ToMatlab.m file in the Kernel folder and added Needs["ToMatlab"] in init.m. However, it still doesn't work. Is it a problem with my operation? – Lin 张 Jun 23 '18 at 13:09
• Don't forget the backtick after the packagename (markdown has a tendency to eat it). It should be Needs["ToMatlab"]. Or how do you load the packages usually? Make sure that it is is located somewhere where mathematica can find it (e.g.in FileNames[FileNameJoin[$UserBaseDirectory, "Applications"]]) and that you edited the Init.m file that belongs to your user account (it's FileNames[FileNameJoin[$UserBaseDirectory, "Kernel", "init.m"]]). – Henrik Schumacher Jun 23 '18 at 13:15
• After running FileNameJoin[{\$UserBaseDirectory, "Applications"}], C:\Users\Administrator\AppData\Roaming\Mathematica\ApplicationData appears.Then I created a folder: C:\Users\Administrator\AppData\Roaming\Mathematica\ApplicationData\ToMatlabZl\Kernel. At the same time, I placed ToMatlab.m in the ToMatlabZl folder. Added Needs["ToMatlab"] to init.m in the Kernel folder.Create a new notebook. You need to enter Get["ToMatlab""] before using ToMatlab. If you do not have Get["ToMatlab"", you cannot use the ToMatlab command. Is there any problem with my operation? thank you. – Lin 张 Jun 23 '18 at 14:47
• Thank you, I've got it. – Lin 张 Jun 23 '18 at 15:20