T = readtable('data.csv')
C = table2cell(T);
Date = C(:,1);
time = C(:,2);
depth_chl_bottom = cell2mat(C(:,3));
Chl_Bottom = cell2mat(C(:,4));
depth_chl_surface = cell2mat(C(:,5));
Chl_Surface = cell2mat(C(:,6));
[Chl_Surface_max_value,time_index_max_Chl_Surface] = max(Chl_Surface);
[Chl_Bottom_max_value,time_index_max_Chl_Bottom] = max(Chl_Bottom);
x_axis = 1:length(Date);
figure(1),
subplot(2,1,1),plot(x_axis,Chl_Surface,'b',x_axis(time_index_max_Chl_Surface),Chl_Surface_max_value,'ro');
subplot(2,1,2),plot(x_axis,Chl_Bottom,'b',x_axis(time_index_max_Chl_Bottom),Chl_Bottom_max_value,'ro');
3 Comments
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/629918-correlating-values-from-a-table-using-a-for-loop#comment_1102719
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/629918-correlating-values-from-a-table-using-a-for-loop#comment_1102719
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/629918-correlating-values-from-a-table-using-a-for-loop#comment_1103414
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/629918-correlating-values-from-a-table-using-a-for-loop#comment_1103414
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/629918-correlating-values-from-a-table-using-a-for-loop#comment_1108795
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/629918-correlating-values-from-a-table-using-a-for-loop#comment_1108795
Sign in to comment.