I need to import the data seen in the image below, The second image represents data from 1 csv file
The code below was taken from
and successfully reads the names of the files but only saves the data from the last file.
*I need to combine all the files that are from the same day and plot the temperature,voltage and strain from that certain day against the time recorded. each file represents 2-5 minutes of data, the name of the file contains the date and the time of reading.
The folder contains 24 days in total, each day with different amount of hours recorded.
% Specify the folder where the files live.
myFolder = 'C:\Users\YOU215\Desktop\liverpool bridge\Temp'; % Check to make sure that folder actually exists. Warn user if it doesn't.
if ~isdir(myFolder) errorMessage = sprintf('Error: The following folder does not exist:\n%s', myFolder); uiwait(warndlg(errorMessage)); return; end % Get a list of all files in the folder with the desired file name pattern.
filePattern = fullfile(myFolder, '*.csv'); % Change to whatever pattern you need.
theFiles = dir(filePattern); for k = 1 : length(theFiles) baseFileName = theFiles(k).name; fullFileName = fullfile(myFolder, baseFileName); fprintf(1, 'Now reading %s\n', fullFileName); end
Best Answer