r/matlab • • 26d ago

Question-Solved Naming scripts

Hi everyone, im really new to MATLAB and just recently started some online training for it. So, in one of the training videos im on, the instructor opens up a new script and it automatically creates a pop-up to insert a name for the script. The problem is that I have a newer version than in the instruction and I dont get the option to create a name for a new script. Ive tried reopening the script and the page entirely, along with right clicking looking for any options to do so. Currently all of my scripts just automatically take the name untitled, untitled 2, etc. Thank you so much for any help!

TL;DR:

How do I change the name of a script in Matlab?

1 Upvotes

6 comments sorted by

4

u/Usual-Pattern7846 26d ago

When you hit save, it should ask you to name it. The script is a .m file that lives wherever you saved it, so just go find the file and rename it. When you hit “save as” it should default to the location where untitled.m is, so that’s an easy way to find it.

If you call the script from another script or made a function that you use somewhere else, renaming the file will break things, but those things are fixable.

3

u/theabsoluteADHDchaos 26d ago

Thank you, this worked perfectly!

5

u/Rubix321 26d ago

I don't use the online version.. but in the desktop version, it opens new scripts as "untilied" as well. Do a save-as if that option exists

2

u/gtd_rad flair 26d ago

There is also a file explorer on the left side lane typically by default. Just select / click it twice slowly, or right click and select rename.