How to import data from multiple files into MATLAB?
7 vues (au cours des 30 derniers jours)
Asher Zaidi le 5 Juin 2018
I have multiple text files that I need to import into MATLAB so that I can analyze the data. Here is what I have so far:
x = importdata('1.txt'); %creates x.data and x.textdata
z1 = x.data(:,5); %grabs column 5 from x.data
z2 = x.data(:,6); %grabs column 6 from x.data
%%obtains value closest to 0 in column 'z2'
[~, imin] = min(abs(z2 - numb));
How can I import multiple files to run the same operation on every text file? I've tried load(), however, it doesn't seem to work.