Plotting data from table iteratively
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone,
I created this code to import data from csv file. Inside the csv files, the rows are depths and columns are dates.
I need to create a part of code plotting the data from table, asking input date/dates to user.
In the part of code with variablesName I save the name of columns (date but not as datetime), I have not clear how to plot the data specifying the column/columns.
Thanks,
directory = '/Users/SA/Data';
S = dir(fullfile(directory,'*.csv'));
for k = 1:numel(S)
F = fullfile(directory,S(k).name);
S(k).data = readtable(F, 'PreserveVariableNames', true, 'ReadVariableNames', true);
end
% Read variables name inside the structure and save array
variablesName = fieldnames(S(1).data);
date_COR_0200 = variablesName';
variablesName = fieldnames(S(2).data);
date_COR_0287 = variablesName';
variablesName = fieldnames(S(3).data);
date_COR_0315 = variablesName';
COR_0200 = S(1).data;
COR_0287 = S(2).data;
COR_0315 = S(3).data;
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Descriptive Statistics and Visualization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!