how do i make directly run my .m file
29 views (last 30 days)
Show older comments
i have a .m file that does something. when i double click .m file , it opens in editor. i want it to be directly run. it is still doable, when i right click there is "run" but i want it to be directly run.
is it possible
0 Comments
Accepted Answer
Star Strider
on 5 Jan 2015
Type its name (with or without the .m extension) in the Command Window and hit ‘Enter’. It should run.
2 Comments
Star Strider
on 5 Jan 2015
viceice4’s Answer moved here...
thanks for answer, but i want it run when i double click file from windows interface. like executable files.
Star Strider
on 5 Jan 2015
My pleasure.
I do not believe that is possible with an .m file. You can only run them in the MATLAB environment. You have to have the MATLAB Compiler if you want to create MATLAB stand-alone code that you can run as an .exe file. (I don’t have the Compiler, so in spite of my wanting to give you a reliable reference to it, I am not able to access it in the online documentation. The link here is my best guess as to the correct software.)
More Answers (1)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!