Why is there aditional data loaded
Ältere Kommentare anzeigen
I have an issue where when I try to load data, another set of data is loaded and vectors are drawn from it immedeaty.
I've made a seperate script to test why it happens and I can't figure it out. the script is no longer than what I post here. I load data the following way:
close all
clear all
clc
%% seperate to close and load seperately.
load('TEST1_5_5_5randomdrive.mat')
%% this is the end of the test script
Right after I load TEST1_5_5_5randomdrive.mat, the 25351,1 double, another data file (Test213221filter5) is loaded and from that ay, AY and all the other 808,1 doubles are drawn even though I did not ask for that in this script. the workspace looks like this after running the above script:

I have in other scripts. Those scripts are closed and the files I load into there are in seperate folders. In those scripts I make Q the data and draw all the vectors from that. But this script is literally close everything and load the data into the workspace and it does all the extra stuff.
Antworten (1)
Stephen23
am 6 Apr. 2022
" But this script is literally close everything and load the data into the workspace and it does all the extra stuff."
No "extra stuff" is happening.
That mat file contains all of those variables. You can check the .mat file content using WHOS:
whos -file TEST1_5_5_5randomdrive.mat
Your code loads all of the variables from the mat file. Ergo, all of them will appear in the workspace. So far everything is working exactly as expected and documented.
Your code is not robust: you should always LOAD into an output variable (to avoid exactly the kind of issue that you are having now). When you do that, you will also be able to clearly see the loaded data in the output structure.
2 Kommentare
Wouter Kamperman
am 6 Apr. 2022
Stephen23
am 6 Apr. 2022
"...to find out why it was happening"
You LOAD all of the .mat file data. That is what is happening.
Kategorien
Mehr zu Whos finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!