Question:
Can I create a MATLAB program on notepad?
Shrew
2011-10-28 21:51:30 UTC
I don't want to purchase matlab, so I do my matlab class assigments at the computer lab. Sometimes I don't feel like walking all the way to the lab, or it's closed, and I already have the code saved on my flashdrive... except for a small error, such as missing semicolon. If I open the matlab script on notepad on my home laptop (saved previously as a ".m"), and then submit it via e-mail online to my teacher, will it still be able to open on matlab? Do I have to do something specific while saving it on notepad, such as re-adding the ".m" to the save-as name..? Thanks in advanced!
Three answers:
Little Princess
2011-10-28 22:06:52 UTC
You can do the principle writing using notepad (or just about any text editor) and then read that into matlab. Like you said, you're likely going to have to make changes to make it work right, but then you can save it as a .m file (if you didn't already give it a .m extension).
Jared
2011-10-29 05:10:09 UTC
You should be fine. An m-file is no more than a text file that usually associates itself with matlab. Although I would recommend sing a better editor like Notepad++ which has syntax highlighting to make sure you catch some little errors before submission. Also, you might want to see if your school has a Server running Linux with matlab on it or remote desktop capability. Alternatively, there is a program called Octave(command line, but can still use m-files) which is free and basically a replica of MATLAB. There are small differences, but well written programs are cross compatible. There is also a gui for Octave called QtOctave. This will let plot, see variabes, cmd history, open files, etc. I like it, but have since moved onto Python to interface with C/C++ and fortran.



Good Luck
?
2011-10-29 05:05:58 UTC
Changing Extension is not a big issue, you can even write text file and later copy paste it into new .m file.





Also try open source Scilab, instead.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...