Plotting data from table iteratively

1 vue (au cours des 30 derniers jours)
Stefano Alberti
Stefano Alberti le 9 Juin 2020
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;

Réponses (0)

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by