How to load a txt file and save the workspace

Antworten (1)

Mathieu NOE
Mathieu NOE am 22 Sep. 2023

0 Stimmen

you can create a structure D where all informations are stored (filenames and data)
D = dir('*.txt'); % D is a structure array
for k = 1:numel(D)
D(k).data = readmatrix(D(k).name);
end

Tags

Gefragt:

am 22 Sep. 2023

Kommentiert:

am 23 Sep. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by