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 次查看(过去 30 天)
显示 更早的评论
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.
回答(1 个)
Walter Roberson
2017-9-16
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!