MATLAB: How i can fix a code that i write its, in start up of matlab software
startup
i wish have code that it run automatically
Best Answer
This is relatively easy to do, because when you create yourstartup file (asstartup.m), it runs when MATLAB launches.
Create and save it in your regular MATLAB user directory (to test it), thencopy it (on Windows machines, use File Explorer) to'C:\Program Files\MATLAB\R2015a\toolbox\local\'. If you change it, you have to repeat this process, and you have to do it every time you upgrade to a new version of MATLAB. You can run it as you would any other.m file in your user path to test it.
I notice that if I already have MATLAB open and then double click on an M-File in the Windows Explorer, it will open up a new instance of MATLAB, just as you described. If I right-click on the file, select Open With, and select the version of MATLAB that I already have running, then it will open in the editor window correctly without opening another instance of MATLAB.
I usually use ActiveX if I want "live" communication with Microsoft Office products. You can search this forum for ActiveX and you'll get lots of hits.
Otherwise pass stuff around via text files, Excel workbooks, or whatever file type you want to use.
Best Answer