Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent MATLAB from creating a new file when it can't find the file I want to open

Tags:

ide

matlab

I will often attempt to open an existing MATLAB file from the MATLAB command window using something like:

edit exampleFile

Alternatively, I may press cmd + shift + D with the name of a function to be opened highlighted in the editor.

However, if the function I wish to open is not on the path when using either of these methods, MATLAB will irritatingly create a new blank file exampleFile.m in the current folder. This is extremely annoying. Is there a way to stop this? Ideally, MATLAB would prompt to see if I wanted to create a new file before actually doing it.

like image 738
Bill Cheatham Avatar asked Feb 02 '23 23:02

Bill Cheatham


1 Answers

In File -> Preferences -> General -> Confirmation Dialogs, there is a checkbox that says "prompt when editing a file that does not exist". Check it.

like image 77
Jonas Avatar answered Feb 05 '23 17:02

Jonas