Trying to import a .txt data file into matlab. When I run the script, the data from the .txt file disappears and my variables become undefined.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
As the title says. Every time I attempt to run the script my imported data disappears and my variables become undefined.
<<
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167214/image.png)
>> Image is what I am seeing after I attempt to run the script.
Réponses (1)
Walter Roberson
le 16 Sep 2017
The code is doing what you asked it to do. If you do not want your variables to become undefined then your code should not tell MATLAB to undefine all variables as literally the very first thing it does ("clear all")
0 commentaires
Voir également
Catégories
En savoir plus sur Data Import and Export dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!