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

妖精的绣舞 提交于 2019-12-05 18:49:17

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/4663659/prevent-matlab-from-creating-a-new-file-when-it-cant-find-the-file-i-want-to-op

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!