The command save is used to store variables of the current workspace, i.e. save data.
There is no simple command to save m-code. Instead it's typically done interactively.
- Create or modify a code
- Click the Save icon or the little down-arrow below the Save icon
- Chose folder and filename
- Click Save in the bottom right corner of the save file dialog
Open the m-file interactively. The Open File icon is next to the Save icon