Effacer les filtres
Effacer les filtres

fopen is not being supported in my MATLAB version. What else can I use?

11 vues (au cours des 30 derniers jours)
Anuradha Bhattacharya
Anuradha Bhattacharya le 23 Sep 2016
Modifié(e) : Image Analyst le 26 Mar 2023
Whenever I use fopen it is giving some or the other error. Please tell me an aletrnative.
  6 commentaires
KSSV
KSSV le 26 Sep 2016
I strongly suggest you to read the documentation properly before using any function.
Walter Roberson
Walter Roberson le 26 Sep 2016
if you are trying to use fopen() to write a file and you did not specify the path to the file, then you are probably not in a directory that you have permission to write in. The default directory when you start up MATLAB can end up being the one that MATLAB is installed in.

Connectez-vous pour commenter.

Réponses (1)

James Tursa
James Tursa le 23 Sep 2016
Modifié(e) : Image Analyst le 26 Mar 2023
Do you have the fopen function shadowed by another function or variable? What does this show:
which -all fopen
  3 commentaires
John D'Errico
John D'Errico le 26 Mar 2023
That means you wrote some function named fopen. Find the function you wrote using this command:
which fopen -all
built-in (/MATLAB/toolbox/matlab/iofun/fopen) /MATLAB/toolbox/matlab/serial/@serial/fopen.m % serial method /MATLAB/toolbox/instrument/instrument/@i2c/fopen.m % i2c method /MATLAB/toolbox/shared/instrument/@icinterface/fopen.m % icinterface method
and rename the function you wrote to something else.
Alexander
Alexander le 26 Mar 2023
Yep I just figured it out, thanks

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by