Plotting data from table iteratively

1 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by