Clear Filters
Clear Filters

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 views (last 30 days)
As the title says. Every time I attempt to run the script my imported data disappears and my variables become undefined.
<<
>> Image is what I am seeing after I attempt to run the script.

Answers (1)

Walter Roberson
Walter Roberson on 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")

Categories

Find more on Data Import and Export in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!