Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Unable to open some mfiles. Matlab thinks the mfile is alread open, but it isn't.

1 visualizzazione (ultimi 30 giorni)
I am running Matlab 2017b on Ubuntu 16.04. When I try to open some mfiles using the editor, the screen flickers like a window is going to open and then the 'window' shrinks down into the Matlab icon. I have opened these files before without any issues and I can look at the files using other editors/text dumps.
I can copy the file using the command line to another directory and then open it, but can not save it back to the original directory. If I try to save it in the original directory I get the following message:
Select File for Save As
filename.m already exists. Do you want to replace it? [yes]
then after clicking yes I get the following error
MATLAB Editor
filename.m is already open in the MATLAB Editor. To overwrite the file, close the original first.
The problem is the original is not open. I can look at the mfile using other software. Is there any way to to convince the editor that the file is not open?
Thank you for any help with this problem.
  1 Commento
Bob Thompson
Bob Thompson il 29 Mar 2018
Modificato: Bob Thompson il 29 Mar 2018
It is likely that the files get called up by some script but are not properly closed by the script. The files don't appear open, but MATLAB still has them considered to be opened. This happens a lot with commands like fopen.
Sometimes fclose(all) will work to fix this, otherwise, my suggestion is just to close and reopen MATLAB. This will close all windows and files it has open.

Risposte (1)

Deb West-Mack
Deb West-Mack il 29 Mar 2018
Thank you for the quick reply. I should have mentioned that I have tried closing and reopening MATLAB as well as shutting down and starting up the commuter. That does not seem to solve the problem, which frustrating considering the error message I receive when I try to save the file.

Questa domanda è chiusa.

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by