0

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?

Seeds
  • 65
  • 6
  • 1
    Just add Needs["ToMatlab"]to your [Init.m` file](https://mathematica.stackexchange.com/q/63739/38178). – 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? – Seeds 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. – Seeds Jun 23 '18 at 14:47
  • Thank you, I've got it. – Seeds Jun 23 '18 at 15:20
  • I have closed your question since you got your answer in the comments and the information can be found on various posts on the site. I gave you two links to posts with answers that I believe are easy to understand and provide further information. Other than that, I want to welcome you on Mathematica.SE! Start by taking time to read the FAQ and take the introductory Tour now. – halirutan Jun 23 '18 at 17:29
  • Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Jul 01 '18 at 14:57

0 Answers0