Inputting Date Time data and presenting as a graph
7 次查看(过去 30 天)
显示 更早的评论
Sophia
2021-12-7
A = importdata('08_underwater.txt')
A = readtimetable('08_underwater.txt')
A.Properties.VariableNames{1} = 'Light';
A.Time.Format='M/dd/yyyy HH:mm'
plot(A.Time,A.Light)
^ with this the x axis appears totally wrong as I am plotting data for only 01/12/21 - 03/12/21
Light is correctly displayed on the y axis
I would like to show light changes over time over the three days
I am wondering if the x axis requires more formatting?
回答(1 个)
Chunru
2021-12-7
A = readtimetable('08_underwater.csv')
A.Properties.VariableNames{1} = 'Light';
plot(A.Datetime,A.Light)
29 个评论
Sophia
2021-12-7
>> opts = setvaropts(opts,Time,'InputFormat','M/dd/yyyy HH:mm');
Unrecognized function or variable 'Time'.
^ tried the above
Sophia
2021-12-7
None of that seems to be working, sorry
>> A = readtimetable('08_underwater.csv')
Error using readtimetable (line 396)
Unable to detect datetime or duration data in file
>> opts = setvaropts(opts,'Datetime','InputFormat','M/dd/yyyy HH:mm');
Unrecognized function or variable 'opts'.
Chunru
2021-12-7
You need to initialize opts before setvaropts:
opts = detectImportOptions('08_underwater.csv');
Have you used a different data file from what you uploaded?
Sophia
2021-12-7
A = importdata('08_underwater.csv')
A = readtable('08_underwater.csv')
opts = detectImportOptions('08_underwater.csv');
opts = setvaropts(opts,'Datetime','InputFormat','M/dd/yyyy HH:mm');
Error using matlab.io.ImportOptions/setvaropts (line 450)
Unknown Option 'InputFormat' for the selection of variables. Check
the variable types and valid options for those types.
I can't seem to get further than initialising the opts
Chunru
2021-12-7
编辑:Chunru
2021-12-12
% You just need one of the two "read" to read the data
%
% The following returns a cell array. [Not recommended as you
% need to convert the format]
% A = importdata('08_underwater.csv')
% The following read in data as table.
opts = detectImportOptions('08_underwater.csv');
opts = setvaropts(opts, 'Datetime', 'InputFormat', 'dd/MM/uuuu HH:mm:ss');
type 08_underwater.csv
Datetime,Light
01/12/2021 09:35:00,100.60
01/12/2021 09:40:00,111.40
01/12/2021 09:45:00,106.20
01/12/2021 09:50:00,86.20
01/12/2021 09:55:00,87.30
01/12/2021 10:00:00,88.80
01/12/2021 10:05:00,100.50
01/12/2021 10:10:00,110.50
01/12/2021 10:15:00,124.00
01/12/2021 10:20:00,137.30
01/12/2021 10:25:00,143.40
01/12/2021 10:30:00,150.60
01/12/2021 10:35:00,159.70
01/12/2021 10:40:00,152.70
01/12/2021 10:45:00,134.40
01/12/2021 10:50:00,106.80
01/12/2021 10:55:00,116.20
01/12/2021 11:00:00,124.50
01/12/2021 11:05:00,136.20
01/12/2021 11:10:00,142.60
01/12/2021 11:15:00,141.80
01/12/2021 11:20:00,122.10
01/12/2021 11:25:00,139.70
01/12/2021 11:30:00,203.40
01/12/2021 11:35:00,278.30
01/12/2021 11:40:00,321.80
01/12/2021 11:45:00,254.00
01/12/2021 11:50:00,165.50
01/12/2021 11:55:00,128.40
01/12/2021 12:00:00,116.90
01/12/2021 12:05:00,151.50
01/12/2021 12:10:00,180.40
01/12/2021 12:15:00,160.50
01/12/2021 12:20:00,148.00
01/12/2021 12:25:00,166.00
01/12/2021 12:30:00,181.60
01/12/2021 12:35:00,171.10
01/12/2021 12:40:00,152.90
01/12/2021 12:45:00,144.30
01/12/2021 12:50:00,147.10
01/12/2021 12:55:00,166.60
01/12/2021 13:00:00,172.20
01/12/2021 13:05:00,174.40
01/12/2021 13:10:00,150.60
01/12/2021 13:15:00,113.00
01/12/2021 13:20:00,66.40
01/12/2021 13:25:00,121.80
01/12/2021 13:30:00,123.80
01/12/2021 13:35:00,294.30
01/12/2021 13:40:00,465.90
01/12/2021 13:45:00,268.30
01/12/2021 13:50:00,190.40
01/12/2021 13:55:00,146.30
01/12/2021 14:00:00,206.00
01/12/2021 14:05:00,130.90
01/12/2021 14:10:00,86.60
01/12/2021 14:15:00,125.70
01/12/2021 14:20:00,166.40
01/12/2021 14:25:00,183.90
01/12/2021 14:30:00,144.20
01/12/2021 14:35:00,130.70
01/12/2021 14:40:00,129.80
01/12/2021 14:45:00,103.10
01/12/2021 14:50:00,123.40
01/12/2021 14:55:00,147.70
01/12/2021 15:00:00,134.20
01/12/2021 15:05:00,143.00
01/12/2021 15:10:00,153.20
01/12/2021 15:15:00,146.10
01/12/2021 15:20:00,152.50
01/12/2021 15:25:00,148.10
01/12/2021 15:30:00,158.20
01/12/2021 15:35:00,184.70
01/12/2021 15:40:00,173.40
01/12/2021 15:45:00,198.80
01/12/2021 15:50:00,186.60
01/12/2021 15:55:00,193.80
01/12/2021 16:00:00,211.90
01/12/2021 16:05:00,220.80
01/12/2021 16:10:00,132.60
01/12/2021 16:15:00,133.60
01/12/2021 16:20:00,200.10
01/12/2021 16:25:00,133.60
01/12/2021 16:30:00,121.00
01/12/2021 16:35:00,142.90
01/12/2021 16:40:00,78.20
01/12/2021 16:45:00,61.50
01/12/2021 16:50:00,66.50
01/12/2021 16:55:00,50.30
01/12/2021 17:00:00,52.10
01/12/2021 17:05:00,65.90
01/12/2021 17:10:00,58.30
01/12/2021 17:15:00,63.90
01/12/2021 17:20:00,55.10
01/12/2021 17:25:00,54.00
01/12/2021 17:30:00,50.80
01/12/2021 17:35:00,52.70
01/12/2021 17:40:00,38.80
01/12/2021 17:45:00,33.60
01/12/2021 17:50:00,42.90
01/12/2021 17:55:00,51.60
01/12/2021 18:00:00,31.90
01/12/2021 18:05:00,35.70
01/12/2021 18:10:00,28.20
01/12/2021 18:15:00,18.10
01/12/2021 18:20:00,20.50
01/12/2021 18:25:00,11.70
01/12/2021 18:30:00,13.40
01/12/2021 18:35:00,11.30
01/12/2021 18:40:00,9.80
01/12/2021 18:45:00,7.60
01/12/2021 18:50:00,8.40
01/12/2021 18:55:00,5.70
01/12/2021 19:00:00,4.40
01/12/2021 19:05:00,3.50
01/12/2021 19:10:00,4.20
01/12/2021 19:15:00,3.60
01/12/2021 19:20:00,2.80
01/12/2021 19:25:00,1.90
01/12/2021 19:30:00,1.50
01/12/2021 19:35:00,1.00
01/12/2021 19:40:00,0.70
01/12/2021 19:45:00,0.40
01/12/2021 19:50:00,0.10
01/12/2021 19:55:00,0.00
01/12/2021 20:00:00,0.00
01/12/2021 20:05:00,0.00
01/12/2021 20:10:00,0.00
01/12/2021 20:15:00,0.20
01/12/2021 20:20:00,0.30
01/12/2021 20:25:00,0.20
01/12/2021 20:30:00,0.00
01/12/2021 20:35:00,0.00
01/12/2021 20:40:00,0.00
01/12/2021 20:45:00,0.00
01/12/2021 20:50:00,0.00
01/12/2021 20:55:00,0.00
01/12/2021 21:00:00,0.00
01/12/2021 21:05:00,0.00
01/12/2021 21:10:00,0.00
01/12/2021 21:15:00,0.00
01/12/2021 21:20:00,0.00
01/12/2021 21:25:00,0.00
01/12/2021 21:30:00,0.00
01/12/2021 21:35:00,0.00
01/12/2021 21:40:00,0.00
01/12/2021 21:45:00,0.00
01/12/2021 21:50:00,0.00
01/12/2021 21:55:00,0.00
01/12/2021 22:00:00,0.00
01/12/2021 22:05:00,0.00
01/12/2021 22:10:00,0.00
01/12/2021 22:15:00,0.00
01/12/2021 22:20:00,0.00
01/12/2021 22:25:00,0.00
01/12/2021 22:30:00,0.00
01/12/2021 22:35:00,0.00
01/12/2021 22:40:00,0.00
01/12/2021 22:45:00,0.00
01/12/2021 22:50:00,0.00
01/12/2021 22:55:00,0.00
01/12/2021 23:00:00,0.00
01/12/2021 23:05:00,0.00
01/12/2021 23:10:00,0.00
01/12/2021 23:15:00,0.00
01/12/2021 23:20:00,0.00
01/12/2021 23:25:00,0.00
01/12/2021 23:30:00,0.00
01/12/2021 23:35:00,0.00
01/12/2021 23:40:00,0.00
01/12/2021 23:45:00,0.00
01/12/2021 23:50:00,0.00
01/12/2021 23:55:00,0.00
01/12/2021 24:00:00,0.00
02/12/2021 00:05:00,0.00
02/12/2021 00:10:00,0.00
02/12/2021 00:15:00,0.00
02/12/2021 00:20:00,0.00
02/12/2021 00:25:00,0.00
02/12/2021 00:30:00,0.00
02/12/2021 00:35:00,0.00
02/12/2021 00:40:00,0.00
02/12/2021 00:45:00,0.00
02/12/2021 00:50:00,0.00
02/12/2021 00:55:00,0.00
02/12/2021 01:00:00,0.00
02/12/2021 01:05:00,0.00
02/12/2021 01:10:00,0.00
02/12/2021 01:15:00,0.00
02/12/2021 01:20:00,0.00
02/12/2021 01:25:00,0.00
02/12/2021 01:30:00,0.00
02/12/2021 01:35:00,0.00
02/12/2021 01:40:00,0.00
02/12/2021 01:45:00,0.00
02/12/2021 01:50:00,0.00
02/12/2021 01:55:00,0.00
02/12/2021 02:00:00,0.00
02/12/2021 02:05:00,0.00
02/12/2021 02:10:00,0.00
02/12/2021 02:15:00,0.00
02/12/2021 02:20:00,0.00
02/12/2021 02:25:00,0.00
02/12/2021 02:30:00,0.00
02/12/2021 02:35:00,0.00
02/12/2021 02:40:00,0.00
02/12/2021 02:45:00,0.00
02/12/2021 02:50:00,0.00
02/12/2021 02:55:00,0.00
02/12/2021 03:00:00,0.00
02/12/2021 03:05:00,0.00
02/12/2021 03:10:00,0.00
02/12/2021 03:15:00,0.00
02/12/2021 03:20:00,0.00
02/12/2021 03:25:00,0.00
02/12/2021 03:30:00,0.00
02/12/2021 03:35:00,0.00
02/12/2021 03:40:00,0.00
02/12/2021 03:45:00,0.00
02/12/2021 03:50:00,0.00
02/12/2021 03:55:00,0.00
02/12/2021 04:00:00,0.00
02/12/2021 04:05:00,0.00
02/12/2021 04:10:00,0.00
02/12/2021 04:15:00,0.00
02/12/2021 04:20:00,0.00
02/12/2021 04:25:00,0.00
02/12/2021 04:30:00,0.00
02/12/2021 04:35:00,0.00
02/12/2021 04:40:00,0.00
02/12/2021 04:45:00,0.00
02/12/2021 04:50:00,0.00
02/12/2021 04:55:00,0.00
02/12/2021 05:00:00,0.00
02/12/2021 05:05:00,0.00
02/12/2021 05:10:00,0.00
02/12/2021 05:15:00,0.00
02/12/2021 05:20:00,0.00
02/12/2021 05:25:00,0.00
02/12/2021 05:30:00,0.20
02/12/2021 05:35:00,0.50
02/12/2021 05:40:00,1.20
02/12/2021 05:45:00,2.00
02/12/2021 05:50:00,3.10
02/12/2021 05:55:00,4.20
02/12/2021 06:00:00,5.30
02/12/2021 06:05:00,6.40
02/12/2021 06:10:00,7.60
02/12/2021 06:15:00,8.20
02/12/2021 06:20:00,9.20
02/12/2021 06:25:00,9.80
02/12/2021 06:30:00,10.50
02/12/2021 06:35:00,11.10
02/12/2021 06:40:00,11.50
02/12/2021 06:45:00,12.30
02/12/2021 06:50:00,12.50
02/12/2021 06:55:00,12.90
02/12/2021 07:00:00,13.30
02/12/2021 07:05:00,13.70
02/12/2021 07:10:00,14.10
02/12/2021 07:15:00,14.40
02/12/2021 07:20:00,14.90
02/12/2021 07:25:00,15.20
02/12/2021 07:30:00,15.70
02/12/2021 07:35:00,16.60
02/12/2021 07:40:00,16.80
02/12/2021 07:45:00,18.30
02/12/2021 07:50:00,18.60
02/12/2021 07:55:00,18.60
02/12/2021 08:00:00,24.30
02/12/2021 08:05:00,30.70
02/12/2021 08:10:00,30.00
02/12/2021 08:15:00,34.70
02/12/2021 08:20:00,38.00
02/12/2021 08:25:00,48.50
02/12/2021 08:30:00,53.80
02/12/2021 08:35:00,82.70
02/12/2021 08:40:00,63.80
02/12/2021 08:45:00,60.10
02/12/2021 08:50:00,44.30
02/12/2021 08:55:00,28.80
02/12/2021 09:00:00,29.10
02/12/2021 09:05:00,33.10
02/12/2021 09:10:00,45.70
02/12/2021 09:15:00,61.20
02/12/2021 09:20:00,74.10
02/12/2021 09:25:00,125.20
02/12/2021 09:30:00,149.60
02/12/2021 09:35:00,164.90
02/12/2021 09:40:00,154.70
02/12/2021 09:45:00,126.80
02/12/2021 09:50:00,105.60
02/12/2021 09:55:00,143.20
02/12/2021 10:00:00,144.30
02/12/2021 10:05:00,154.30
02/12/2021 10:10:00,228.80
02/12/2021 10:15:00,334.90
02/12/2021 10:20:00,390.70
02/12/2021 10:25:00,215.10
02/12/2021 10:30:00,158.10
02/12/2021 10:35:00,281.10
02/12/2021 10:40:00,382.60
02/12/2021 10:45:00,186.20
02/12/2021 10:50:00,467.00
02/12/2021 10:55:00,424.70
02/12/2021 11:00:00,601.90
02/12/2021 11:05:00,479.30
02/12/2021 11:10:00,443.40
02/12/2021 11:15:00,247.20
02/12/2021 11:20:00,249.00
02/12/2021 11:25:00,219.60
02/12/2021 11:30:00,242.90
02/12/2021 11:35:00,255.60
02/12/2021 11:40:00,327.30
02/12/2021 11:45:00,342.50
02/12/2021 11:50:00,349.20
02/12/2021 11:55:00,297.80
02/12/2021 12:00:00,289.10
02/12/2021 12:05:00,268.90
02/12/2021 12:10:00,258.20
02/12/2021 12:15:00,249.00
02/12/2021 12:20:00,245.20
02/12/2021 12:25:00,247.50
02/12/2021 12:30:00,252.50
02/12/2021 12:35:00,267.00
02/12/2021 12:40:00,276.10
02/12/2021 12:45:00,283.90
02/12/2021 12:50:00,247.20
02/12/2021 12:55:00,241.70
02/12/2021 13:00:00,233.80
02/12/2021 13:05:00,232.00
02/12/2021 13:10:00,244.20
02/12/2021 13:15:00,207.50
02/12/2021 13:20:00,253.60
02/12/2021 13:25:00,301.70
02/12/2021 13:30:00,341.40
02/12/2021 13:35:00,281.50
02/12/2021 13:40:00,545.80
02/12/2021 13:45:00,630.00
02/12/2021 13:50:00,624.70
02/12/2021 13:55:00,617.50
02/12/2021 14:00:00,833.50
02/12/2021 14:05:00,766.80
02/12/2021 14:10:00,662.90
02/12/2021 14:15:00,582.00
02/12/2021 14:20:00,970.90
02/12/2021 14:25:00,591.80
02/12/2021 14:30:00,553.60
02/12/2021 14:35:00,628.70
02/12/2021 14:40:00,527.80
02/12/2021 14:45:00,786.20
02/12/2021 14:50:00,835.20
02/12/2021 14:55:00,846.30
02/12/2021 15:00:00,766.50
02/12/2021 15:05:00,481.90
02/12/2021 15:10:00,556.20
02/12/2021 15:15:00,526.50
02/12/2021 15:20:00,236.60
02/12/2021 15:25:00,151.20
02/12/2021 15:30:00,128.20
02/12/2021 15:35:00,138.50
02/12/2021 15:40:00,200.50
02/12/2021 15:45:00,694.00
02/12/2021 15:50:00,814.40
02/12/2021 15:55:00,776.80
02/12/2021 16:00:00,788.30
02/12/2021 16:05:00,748.50
02/12/2021 16:10:00,687.30
02/12/2021 16:15:00,683.30
02/12/2021 16:20:00,625.70
02/12/2021 16:25:00,440.40
02/12/2021 16:30:00,170.80
02/12/2021 16:35:00,281.90
02/12/2021 16:40:00,141.30
02/12/2021 16:45:00,84.40
02/12/2021 16:50:00,56.60
02/12/2021 16:55:00,65.20
02/12/2021 17:00:00,78.40
02/12/2021 17:05:00,87.70
02/12/2021 17:10:00,100.30
02/12/2021 17:15:00,67.10
02/12/2021 17:20:00,55.20
02/12/2021 17:25:00,66.30
02/12/2021 17:30:00,67.40
02/12/2021 17:35:00,75.20
02/12/2021 17:40:00,73.60
02/12/2021 17:45:00,49.00
02/12/2021 17:50:00,51.70
02/12/2021 17:55:00,52.30
02/12/2021 18:00:00,41.80
02/12/2021 18:05:00,32.40
02/12/2021 18:10:00,23.70
02/12/2021 18:15:00,23.60
02/12/2021 18:20:00,29.50
02/12/2021 18:25:00,41.80
02/12/2021 18:30:00,32.00
02/12/2021 18:35:00,23.20
02/12/2021 18:40:00,13.30
02/12/2021 18:45:00,10.90
02/12/2021 18:50:00,11.20
02/12/2021 18:55:00,7.50
02/12/2021 19:00:00,5.30
02/12/2021 19:05:00,7.70
02/12/2021 19:10:00,6.90
02/12/2021 19:15:00,5.80
02/12/2021 19:20:00,4.40
02/12/2021 19:25:00,3.60
02/12/2021 19:30:00,2.40
02/12/2021 19:35:00,1.60
02/12/2021 19:40:00,0.90
02/12/2021 19:45:00,0.40
02/12/2021 19:50:00,0.10
02/12/2021 19:55:00,0.00
02/12/2021 20:00:00,0.30
02/12/2021 20:05:00,0.20
02/12/2021 20:10:00,0.00
02/12/2021 20:15:00,0.00
02/12/2021 20:20:00,0.30
02/12/2021 20:25:00,0.20
02/12/2021 20:30:00,0.00
02/12/2021 20:35:00,0.00
02/12/2021 20:40:00,0.00
02/12/2021 20:45:00,0.00
02/12/2021 20:50:00,0.00
02/12/2021 20:55:00,0.00
02/12/2021 21:00:00,0.00
02/12/2021 21:05:00,0.00
02/12/2021 21:10:00,0.00
02/12/2021 21:15:00,0.00
02/12/2021 21:20:00,0.00
02/12/2021 21:25:00,0.00
02/12/2021 21:30:00,0.00
02/12/2021 21:35:00,0.00
02/12/2021 21:40:00,0.00
02/12/2021 21:45:00,0.00
02/12/2021 21:50:00,0.00
02/12/2021 21:55:00,0.00
02/12/2021 22:00:00,0.00
02/12/2021 22:05:00,0.00
02/12/2021 22:10:00,0.00
02/12/2021 22:15:00,0.00
02/12/2021 22:20:00,0.00
02/12/2021 22:25:00,0.00
02/12/2021 22:30:00,0.00
02/12/2021 22:35:00,0.00
02/12/2021 22:40:00,0.00
02/12/2021 22:45:00,0.00
02/12/2021 22:50:00,0.00
02/12/2021 22:55:00,0.00
02/12/2021 23:00:00,0.00
02/12/2021 23:05:00,0.00
02/12/2021 23:10:00,0.00
02/12/2021 23:15:00,0.00
02/12/2021 23:20:00,0.00
02/12/2021 23:25:00,0.00
02/12/2021 23:30:00,0.00
02/12/2021 23:35:00,0.00
02/12/2021 23:40:00,0.00
02/12/2021 23:45:00,0.00
02/12/2021 23:50:00,0.00
02/12/2021 23:55:00,0.00
02/12/2021 24:00:00,0.00
03/12/2021 00:05:00,0.00
03/12/2021 00:10:00,0.00
03/12/2021 00:15:00,0.00
03/12/2021 00:20:00,0.00
03/12/2021 00:25:00,0.00
03/12/2021 00:30:00,0.00
03/12/2021 00:35:00,0.00
03/12/2021 00:40:00,0.00
03/12/2021 00:45:00,0.00
03/12/2021 00:50:00,0.00
03/12/2021 00:55:00,0.00
03/12/2021 01:00:00,0.00
03/12/2021 01:05:00,0.00
03/12/2021 01:10:00,0.00
03/12/2021 01:15:00,0.00
03/12/2021 01:20:00,0.00
03/12/2021 01:25:00,0.00
03/12/2021 01:30:00,0.00
03/12/2021 01:35:00,0.00
03/12/2021 01:40:00,0.00
03/12/2021 01:45:00,0.00
03/12/2021 01:50:00,0.00
03/12/2021 01:55:00,0.00
03/12/2021 02:00:00,0.00
03/12/2021 02:05:00,0.00
03/12/2021 02:10:00,0.00
03/12/2021 02:15:00,0.00
03/12/2021 02:20:00,0.00
03/12/2021 02:25:00,0.00
03/12/2021 02:30:00,0.00
03/12/2021 02:35:00,0.00
03/12/2021 02:40:00,0.00
03/12/2021 02:45:00,0.00
03/12/2021 02:50:00,0.00
03/12/2021 02:55:00,0.00
03/12/2021 03:00:00,0.00
03/12/2021 03:05:00,0.00
03/12/2021 03:10:00,0.00
03/12/2021 03:15:00,0.00
03/12/2021 03:20:00,0.00
03/12/2021 03:25:00,0.00
03/12/2021 03:30:00,0.00
03/12/2021 03:35:00,0.00
03/12/2021 03:40:00,0.00
03/12/2021 03:45:00,0.00
03/12/2021 03:50:00,0.00
03/12/2021 03:55:00,0.00
03/12/2021 04:00:00,0.00
03/12/2021 04:05:00,0.00
03/12/2021 04:10:00,0.00
03/12/2021 04:15:00,0.00
03/12/2021 04:20:00,0.00
03/12/2021 04:25:00,0.00
03/12/2021 04:30:00,0.00
03/12/2021 04:35:00,0.00
03/12/2021 04:40:00,0.00
03/12/2021 04:45:00,0.00
03/12/2021 04:50:00,0.00
03/12/2021 04:55:00,0.00
03/12/2021 05:00:00,0.00
03/12/2021 05:05:00,0.00
03/12/2021 05:10:00,0.00
03/12/2021 05:15:00,0.00
03/12/2021 05:20:00,0.00
03/12/2021 05:25:00,0.00
03/12/2021 05:30:00,0.30
03/12/2021 05:35:00,0.60
03/12/2021 05:40:00,1.30
03/12/2021 05:45:00,2.20
03/12/2021 05:50:00,3.10
03/12/2021 05:55:00,4.30
03/12/2021 06:00:00,5.20
03/12/2021 06:05:00,6.30
03/12/2021 06:10:00,7.30
03/12/2021 06:15:00,8.10
03/12/2021 06:20:00,8.90
03/12/2021 06:25:00,9.70
03/12/2021 06:30:00,10.20
03/12/2021 06:35:00,10.90
03/12/2021 06:40:00,11.40
03/12/2021 06:45:00,12.00
03/12/2021 06:50:00,12.50
03/12/2021 06:55:00,12.90
03/12/2021 07:00:00,13.30
03/12/2021 07:05:00,13.70
03/12/2021 07:10:00,14.10
03/12/2021 07:15:00,14.30
03/12/2021 07:20:00,14.80
03/12/2021 07:25:00,15.00
03/12/2021 07:30:00,15.40
03/12/2021 07:35:00,16.10
03/12/2021 07:40:00,16.40
03/12/2021 07:45:00,16.60
03/12/2021 07:50:00,17.20
03/12/2021 07:55:00,17.50
03/12/2021 08:00:00,17.90
03/12/2021 08:05:00,18.20
03/12/2021 08:10:00,20.80
03/12/2021 08:15:00,25.00
03/12/2021 08:20:00,26.10
03/12/2021 08:25:00,19.80
03/12/2021 08:30:00,22.10
03/12/2021 08:35:00,25.40
03/12/2021 08:40:00,22.60
03/12/2021 08:45:00,20.80
03/12/2021 08:50:00,23.70
03/12/2021 08:55:00,23.30
03/12/2021 09:00:00,23.70
03/12/2021 09:05:00,24.60
03/12/2021 09:10:00,26.80
03/12/2021 09:15:00,39.20
03/12/2021 09:20:00,49.20
03/12/2021 09:25:00,47.00
03/12/2021 09:30:00,34.40
03/12/2021 09:35:00,28.30
03/12/2021 09:40:00,28.50
03/12/2021 09:45:00,30.80
03/12/2021 09:50:00,32.60
03/12/2021 09:55:00,36.70
03/12/2021 10:00:00,65.60
03/12/2021 10:05:00,61.70
03/12/2021 10:10:00,108.40
03/12/2021 10:15:00,448.60
03/12/2021 10:20:00,547.20
03/12/2021 10:25:00,582.30
03/12/2021 10:30:00,603.30
03/12/2021 10:35:00,631.50
03/12/2021 10:40:00,651.40
03/12/2021 10:45:00,620.30
03/12/2021 10:50:00,609.10
03/12/2021 10:55:00,620.50
03/12/2021 11:00:00,544.40
03/12/2021 11:05:00,585.00
03/12/2021 11:10:00,590.50
03/12/2021 11:15:00,543.90
03/12/2021 11:20:00,486.40
03/12/2021 11:25:00,344.40
03/12/2021 11:30:00,229.70
03/12/2021 11:35:00,206.10
03/12/2021 11:40:00,264.20
03/12/2021 11:45:00,289.50
03/12/2021 11:50:00,279.60
03/12/2021 11:55:00,268.20
03/12/2021 12:00:00,259.50
03/12/2021 12:05:00,254.40
03/12/2021 12:10:00,248.90
03/12/2021 12:15:00,246.20
03/12/2021 12:20:00,243.60
03/12/2021 12:25:00,242.30
03/12/2021 12:30:00,237.00
03/12/2021 12:35:00,228.60
03/12/2021 12:40:00,220.50
03/12/2021 12:45:00,217.60
03/12/2021 12:50:00,218.20
03/12/2021 12:55:00,220.90
03/12/2021 13:00:00,225.40
03/12/2021 13:05:00,229.40
03/12/2021 13:10:00,234.70
03/12/2021 13:15:00,212.00
03/12/2021 13:20:00,231.00
03/12/2021 13:25:00,247.40
03/12/2021 13:30:00,166.00
03/12/2021 13:35:00,181.20
03/12/2021 13:40:00,404.60
03/12/2021 13:45:00,779.50
03/12/2021 13:50:00,888.60
03/12/2021 13:55:00,920.50
03/12/2021 14:00:00,864.40
03/12/2021 14:05:00,722.60
03/12/2021 14:10:00,659.80
03/12/2021 14:15:00,644.00
03/12/2021 14:20:00,953.30
03/12/2021 14:25:00,332.70
03/12/2021 14:30:00,288.00
03/12/2021 14:35:00,738.80
03/12/2021 14:40:00,517.30
03/12/2021 14:45:00,786.90
03/12/2021 14:50:00,844.80
03/12/2021 14:55:00,906.30
03/12/2021 15:00:00,755.20
03/12/2021 15:05:00,522.20
03/12/2021 15:10:00,625.60
03/12/2021 15:15:00,596.30
03/12/2021 15:20:00,287.90
03/12/2021 15:25:00,128.10
03/12/2021 15:30:00,119.00
03/12/2021 15:35:00,113.40
03/12/2021 15:40:00,112.00
03/12/2021 15:45:00,679.30
03/12/2021 15:50:00,785.20
03/12/2021 15:55:00,766.80
03/12/2021 16:00:00,747.90
03/12/2021 16:05:00,731.00
03/12/2021 16:10:00,712.60
03/12/2021 16:15:00,692.30
03/12/2021 16:20:00,671.90
03/12/2021 16:25:00,651.70
03/12/2021 16:30:00,630.60
03/12/2021 16:35:00,609.70
03/12/2021 16:40:00,589.60
03/12/2021 16:45:00,565.90
03/12/2021 16:50:00,548.70
03/12/2021 16:55:00,527.40
03/12/2021 17:00:00,509.80
03/12/2021 17:05:00,469.40
03/12/2021 17:10:00,191.80
03/12/2021 17:15:00,48.60
03/12/2021 17:20:00,45.60
03/12/2021 17:25:00,43.80
03/12/2021 17:30:00,45.50
03/12/2021 17:35:00,54.50
03/12/2021 17:40:00,49.50
03/12/2021 17:45:00,40.60
A = readtable('08_underwater.csv', opts)
A = 675×2 table
Datetime Light
___________________ _____
01/12/2021 09:35:00 100.6
01/12/2021 09:40:00 111.4
01/12/2021 09:45:00 106.2
01/12/2021 09:50:00 86.2
01/12/2021 09:55:00 87.3
01/12/2021 10:00:00 88.8
01/12/2021 10:05:00 100.5
01/12/2021 10:10:00 110.5
01/12/2021 10:15:00 124
01/12/2021 10:20:00 137.3
01/12/2021 10:25:00 143.4
01/12/2021 10:30:00 150.6
01/12/2021 10:35:00 159.7
01/12/2021 10:40:00 152.7
01/12/2021 10:45:00 134.4
01/12/2021 10:50:00 106.8
% You don't need the following as the default above works well.
%
% opts = detectImportOptions('08_underwater.csv');
% opts = setvaropts(opts,'Datetime','InputFormat','M/dd/yyyy HH:mm');
plot(A.Datetime,A.Light)
Sophia
2021-12-7
So the Datetime data is still not plotting correctly - the x axis is wrong - any ideas on how to fix this?
My data spans from 01/12/21 - 03/12/21
Sophia
2021-12-7
Yes that graph looks much better!
Can't seem to replicate this though, coming up with the following error
>> opts = setvaropts(opts, 'Datetime', 'InputFormat', 'dd/MM/uuuu HH:mm:ss');
Error using matlab.io.ImportOptions/setvaropts (line 450)
Unknown Option 'InputFormat' for the selection of variables. Check the variable types and
valid options for those types.
Sophia
2021-12-12
Would really appreciate it if you could share the exact code you used to get the above graph as I cannot seem to replicate this for myself
Thank-you
Chunru
2021-12-12
All the code and data are in the post. The code is run on line. I have nothing else to share. Show how you run the code what is the error.
Sophia
2021-12-12
>> clear
>> matlab
Error using matlab.io.ImportOptions/setvaropts (line 450)
Unknown Option 'InputFormat' for the selection of variables. Check the variable types and valid
options for those types.
Error in matlab (line 2)
opts = setvaropts(opts, 'Datetime', 'InputFormat', 'dd/MM/uuuu HH:mm:ss');
Sophia
2021-12-12
>> clear all
>> opts = detectImportOptions('08_underwater.csv')
opts =
DelimitedTextImportOptions with properties:
Format Properties:
Delimiter: {','}
Whitespace: '\b\t '
LineEnding: {'\n' '\r' '\r\n'}
CommentStyle: {}
ConsecutiveDelimitersRule: 'split'
LeadingDelimitersRule: 'keep'
TrailingDelimitersRule: 'ignore'
EmptyLineRule: 'skip'
Encoding: 'UTF-8'
Replacement Properties:
MissingRule: 'fill'
ImportErrorRule: 'fill'
ExtraColumnsRule: 'addvars'
Variable Import Properties: Set types by name using setvartype
VariableNames: {'Datetime', 'Light'}
VariableTypes: {'char', 'double'}
SelectedVariableNames: {'Datetime', 'Light'}
VariableOptions: Show all 2 VariableOptions
Access VariableOptions sub-properties using setvaropts/getvaropts
VariableNamingRule: 'modify'
Location Properties:
DataLines: [2 Inf]
VariableNamesLine: 1
RowNamesColumn: 0
VariableUnitsLine: 0
VariableDescriptionsLine: 0
To display a preview of the table, use preview
>> opts = setvaropts(opts, 'Datetime', 'InputFormat', 'dd/MM/uuuu HH:mm:ss')
Error using matlab.io.ImportOptions/setvaropts (line 450)
Unknown Option 'InputFormat' for the selection of variables. Check the variable types and
valid options for those types.
>> A = readtable('08_underwater.csv', opts)
A =
675×2 table
Datetime Light
___________________ _____
{'1-12-2021 09:35'} 100.6
{'1-12-2021 09:40'} 111.4
{'1-12-2021 09:45'} 106.2
{'1-12-2021 09:50'} 86.2
{'1-12-2021 09:55'} 87.3
{'1-12-2021 10:00'} 88.8
{'1-12-2021 10:05'} 100.5
{'1-12-2021 10:10'} 110.5
{'1-12-2021 10:15'} 124
{'1-12-2021 10:20'} 137.3
{'1-12-2021 10:25'} 143.4
{'1-12-2021 10:30'} 150.6
{'1-12-2021 10:35'} 159.7
{'1-12-2021 10:40'} 152.7
{'1-12-2021 10:45'} 134.4
{'1-12-2021 10:50'} 106.8
{'1-12-2021 10:55'} 116.2
{'1-12-2021 11:00'} 124.5
{'1-12-2021 11:05'} 136.2
{'1-12-2021 11:10'} 142.6
{'1-12-2021 11:15'} 141.8
{'1-12-2021 11:20'} 122.1
{'1-12-2021 11:25'} 139.7
{'1-12-2021 11:30'} 203.4
{'1-12-2021 11:35'} 278.3
{'1-12-2021 11:40'} 321.8
{'1-12-2021 11:45'} 254
{'1-12-2021 11:50'} 165.5
{'1-12-2021 11:55'} 128.4
{'1-12-2021 12:00'} 116.9
{'1-12-2021 12:05'} 151.5
{'1-12-2021 12:10'} 180.4
{'1-12-2021 12:15'} 160.5
{'1-12-2021 12:20'} 148
{'1-12-2021 12:25'} 166
{'1-12-2021 12:30'} 181.6
{'1-12-2021 12:35'} 171.1
{'1-12-2021 12:40'} 152.9
{'1-12-2021 12:45'} 144.3
{'1-12-2021 12:50'} 147.1
{'1-12-2021 12:55'} 166.6
{'1-12-2021 13:00'} 172.2
{'1-12-2021 13:05'} 174.4
{'1-12-2021 13:10'} 150.6
{'1-12-2021 13:15'} 113
{'1-12-2021 13:20'} 66.4
{'1-12-2021 13:25'} 121.8
{'1-12-2021 13:30'} 123.8
{'1-12-2021 13:35'} 294.3
{'1-12-2021 13:40'} 465.9
{'1-12-2021 13:45'} 268.3
{'1-12-2021 13:50'} 190.4
{'1-12-2021 13:55'} 146.3
{'1-12-2021 14:00'} 206
{'1-12-2021 14:05'} 130.9
{'1-12-2021 14:10'} 86.6
{'1-12-2021 14:15'} 125.7
{'1-12-2021 14:20'} 166.4
{'1-12-2021 14:25'} 183.9
{'1-12-2021 14:30'} 144.2
{'1-12-2021 14:35'} 130.7
{'1-12-2021 14:40'} 129.8
{'1-12-2021 14:45'} 103.1
{'1-12-2021 14:50'} 123.4
{'1-12-2021 14:55'} 147.7
{'1-12-2021 15:00'} 134.2
{'1-12-2021 15:05'} 143
{'1-12-2021 15:10'} 153.2
{'1-12-2021 15:15'} 146.1
{'1-12-2021 15:20'} 152.5
{'1-12-2021 15:25'} 148.1
{'1-12-2021 15:30'} 158.2
{'1-12-2021 15:35'} 184.7
{'1-12-2021 15:40'} 173.4
{'1-12-2021 15:45'} 198.8
{'1-12-2021 15:50'} 186.6
{'1-12-2021 15:55'} 193.8
{'1-12-2021 16:00'} 211.9
{'1-12-2021 16:05'} 220.8
{'1-12-2021 16:10'} 132.6
{'1-12-2021 16:15'} 133.6
{'1-12-2021 16:20'} 200.1
{'1-12-2021 16:25'} 133.6
{'1-12-2021 16:30'} 121
{'1-12-2021 16:35'} 142.9
{'1-12-2021 16:40'} 78.2
{'1-12-2021 16:45'} 61.5
{'1-12-2021 16:50'} 66.5
{'1-12-2021 16:55'} 50.3
{'1-12-2021 17:00'} 52.1
{'1-12-2021 17:05'} 65.9
{'1-12-2021 17:10'} 58.3
{'1-12-2021 17:15'} 63.9
{'1-12-2021 17:20'} 55.1
{'1-12-2021 17:25'} 54
{'1-12-2021 17:30'} 50.8
{'1-12-2021 17:35'} 52.7
{'1-12-2021 17:40'} 38.8
{'1-12-2021 17:45'} 33.6
{'1-12-2021 17:50'} 42.9
{'1-12-2021 17:55'} 51.6
{'1-12-2021 18:00'} 31.9
{'1-12-2021 18:05'} 35.7
{'1-12-2021 18:10'} 28.2
{'1-12-2021 18:15'} 18.1
{'1-12-2021 18:20'} 20.5
{'1-12-2021 18:25'} 11.7
{'1-12-2021 18:30'} 13.4
{'1-12-2021 18:35'} 11.3
{'1-12-2021 18:40'} 9.8
{'1-12-2021 18:45'} 7.6
{'1-12-2021 18:50'} 8.4
{'1-12-2021 18:55'} 5.7
{'1-12-2021 19:00'} 4.4
{'1-12-2021 19:05'} 3.5
{'1-12-2021 19:10'} 4.2
{'1-12-2021 19:15'} 3.6
{'1-12-2021 19:20'} 2.8
{'1-12-2021 19:25'} 1.9
{'1-12-2021 19:30'} 1.5
{'1-12-2021 19:35'} 1
{'1-12-2021 19:40'} 0.7
{'1-12-2021 19:45'} 0.4
{'1-12-2021 19:50'} 0.1
{'1-12-2021 19:55'} 0
{'1-12-2021 20:00'} 0
{'1-12-2021 20:05'} 0
{'1-12-2021 20:10'} 0
{'1-12-2021 20:15'} 0.2
{'1-12-2021 20:20'} 0.3
{'1-12-2021 20:25'} 0.2
{'1-12-2021 20:30'} 0
{'1-12-2021 20:35'} 0
{'1-12-2021 20:40'} 0
{'1-12-2021 20:45'} 0
{'1-12-2021 20:50'} 0
{'1-12-2021 20:55'} 0
{'1-12-2021 21:00'} 0
{'1-12-2021 21:05'} 0
{'1-12-2021 21:10'} 0
{'1-12-2021 21:15'} 0
{'1-12-2021 21:20'} 0
{'1-12-2021 21:25'} 0
{'1-12-2021 21:30'} 0
{'1-12-2021 21:35'} 0
{'1-12-2021 21:40'} 0
{'1-12-2021 21:45'} 0
{'1-12-2021 21:50'} 0
{'1-12-2021 21:55'} 0
{'1-12-2021 22:00'} 0
{'1-12-2021 22:05'} 0
{'1-12-2021 22:10'} 0
{'1-12-2021 22:15'} 0
{'1-12-2021 22:20'} 0
{'1-12-2021 22:25'} 0
{'1-12-2021 22:30'} 0
{'1-12-2021 22:35'} 0
{'1-12-2021 22:40'} 0
{'1-12-2021 22:45'} 0
{'1-12-2021 22:50'} 0
{'1-12-2021 22:55'} 0
{'1-12-2021 23:00'} 0
{'1-12-2021 23:05'} 0
{'1-12-2021 23:10'} 0
{'1-12-2021 23:15'} 0
{'1-12-2021 23:20'} 0
{'1-12-2021 23:25'} 0
{'1-12-2021 23:30'} 0
{'1-12-2021 23:35'} 0
{'1-12-2021 23:40'} 0
{'1-12-2021 23:45'} 0
{'1-12-2021 23:50'} 0
{'1-12-2021 23:55'} 0
{'2-12-2021 00:00'} 0
{'2-12-2021 00:05'} 0
{'2-12-2021 00:10'} 0
{'2-12-2021 00:15'} 0
{'2-12-2021 00:20'} 0
{'2-12-2021 00:25'} 0
{'2-12-2021 00:30'} 0
{'2-12-2021 00:35'} 0
{'2-12-2021 00:40'} 0
{'2-12-2021 00:45'} 0
{'2-12-2021 00:50'} 0
{'2-12-2021 00:55'} 0
{'2-12-2021 01:00'} 0
{'2-12-2021 01:05'} 0
{'2-12-2021 01:10'} 0
{'2-12-2021 01:15'} 0
{'2-12-2021 01:20'} 0
{'2-12-2021 01:25'} 0
{'2-12-2021 01:30'} 0
{'2-12-2021 01:35'} 0
{'2-12-2021 01:40'} 0
{'2-12-2021 01:45'} 0
{'2-12-2021 01:50'} 0
{'2-12-2021 01:55'} 0
{'2-12-2021 02:00'} 0
{'2-12-2021 02:05'} 0
{'2-12-2021 02:10'} 0
{'2-12-2021 02:15'} 0
{'2-12-2021 02:20'} 0
{'2-12-2021 02:25'} 0
{'2-12-2021 02:30'} 0
{'2-12-2021 02:35'} 0
{'2-12-2021 02:40'} 0
{'2-12-2021 02:45'} 0
{'2-12-2021 02:50'} 0
{'2-12-2021 02:55'} 0
{'2-12-2021 03:00'} 0
{'2-12-2021 03:05'} 0
{'2-12-2021 03:10'} 0
{'2-12-2021 03:15'} 0
{'2-12-2021 03:20'} 0
{'2-12-2021 03:25'} 0
{'2-12-2021 03:30'} 0
{'2-12-2021 03:35'} 0
{'2-12-2021 03:40'} 0
{'2-12-2021 03:45'} 0
{'2-12-2021 03:50'} 0
{'2-12-2021 03:55'} 0
{'2-12-2021 04:00'} 0
{'2-12-2021 04:05'} 0
{'2-12-2021 04:10'} 0
{'2-12-2021 04:15'} 0
{'2-12-2021 04:20'} 0
{'2-12-2021 04:25'} 0
{'2-12-2021 04:30'} 0
{'2-12-2021 04:35'} 0
{'2-12-2021 04:40'} 0
{'2-12-2021 04:45'} 0
{'2-12-2021 04:50'} 0
{'2-12-2021 04:55'} 0
{'2-12-2021 05:00'} 0
{'2-12-2021 05:05'} 0
{'2-12-2021 05:10'} 0
{'2-12-2021 05:15'} 0
{'2-12-2021 05:20'} 0
{'2-12-2021 05:25'} 0
{'2-12-2021 05:30'} 0.2
{'2-12-2021 05:35'} 0.5
{'2-12-2021 05:40'} 1.2
{'2-12-2021 05:45'} 2
{'2-12-2021 05:50'} 3.1
{'2-12-2021 05:55'} 4.2
{'2-12-2021 06:00'} 5.3
{'2-12-2021 06:05'} 6.4
{'2-12-2021 06:10'} 7.6
{'2-12-2021 06:15'} 8.2
{'2-12-2021 06:20'} 9.2
{'2-12-2021 06:25'} 9.8
{'2-12-2021 06:30'} 10.5
{'2-12-2021 06:35'} 11.1
{'2-12-2021 06:40'} 11.5
{'2-12-2021 06:45'} 12.3
{'2-12-2021 06:50'} 12.5
{'2-12-2021 06:55'} 12.9
{'2-12-2021 07:00'} 13.3
{'2-12-2021 07:05'} 13.7
{'2-12-2021 07:10'} 14.1
{'2-12-2021 07:15'} 14.4
{'2-12-2021 07:20'} 14.9
{'2-12-2021 07:25'} 15.2
{'2-12-2021 07:30'} 15.7
{'2-12-2021 07:35'} 16.6
{'2-12-2021 07:40'} 16.8
{'2-12-2021 07:45'} 18.3
{'2-12-2021 07:50'} 18.6
{'2-12-2021 07:55'} 18.6
{'2-12-2021 08:00'} 24.3
{'2-12-2021 08:05'} 30.7
{'2-12-2021 08:10'} 30
{'2-12-2021 08:15'} 34.7
{'2-12-2021 08:20'} 38
{'2-12-2021 08:25'} 48.5
{'2-12-2021 08:30'} 53.8
{'2-12-2021 08:35'} 82.7
{'2-12-2021 08:40'} 63.8
{'2-12-2021 08:45'} 60.1
{'2-12-2021 08:50'} 44.3
{'2-12-2021 08:55'} 28.8
{'2-12-2021 09:00'} 29.1
{'2-12-2021 09:05'} 33.1
{'2-12-2021 09:10'} 45.7
{'2-12-2021 09:15'} 61.2
{'2-12-2021 09:20'} 74.1
{'2-12-2021 09:25'} 125.2
{'2-12-2021 09:30'} 149.6
{'2-12-2021 09:35'} 164.9
{'2-12-2021 09:40'} 154.7
{'2-12-2021 09:45'} 126.8
{'2-12-2021 09:50'} 105.6
{'2-12-2021 09:55'} 143.2
{'2-12-2021 10:00'} 144.3
{'2-12-2021 10:05'} 154.3
{'2-12-2021 10:10'} 228.8
{'2-12-2021 10:15'} 334.9
{'2-12-2021 10:20'} 390.7
{'2-12-2021 10:25'} 215.1
{'2-12-2021 10:30'} 158.1
{'2-12-2021 10:35'} 281.1
{'2-12-2021 10:40'} 382.6
{'2-12-2021 10:45'} 186.2
{'2-12-2021 10:50'} 467
{'2-12-2021 10:55'} 424.7
{'2-12-2021 11:00'} 601.9
{'2-12-2021 11:05'} 479.3
{'2-12-2021 11:10'} 443.4
{'2-12-2021 11:15'} 247.2
{'2-12-2021 11:20'} 249
{'2-12-2021 11:25'} 219.6
{'2-12-2021 11:30'} 242.9
{'2-12-2021 11:35'} 255.6
{'2-12-2021 11:40'} 327.3
{'2-12-2021 11:45'} 342.5
{'2-12-2021 11:50'} 349.2
{'2-12-2021 11:55'} 297.8
{'2-12-2021 12:00'} 289.1
{'2-12-2021 12:05'} 268.9
{'2-12-2021 12:10'} 258.2
{'2-12-2021 12:15'} 249
{'2-12-2021 12:20'} 245.2
{'2-12-2021 12:25'} 247.5
{'2-12-2021 12:30'} 252.5
{'2-12-2021 12:35'} 267
{'2-12-2021 12:40'} 276.1
{'2-12-2021 12:45'} 283.9
{'2-12-2021 12:50'} 247.2
{'2-12-2021 12:55'} 241.7
{'2-12-2021 13:00'} 233.8
{'2-12-2021 13:05'} 232
{'2-12-2021 13:10'} 244.2
{'2-12-2021 13:15'} 207.5
{'2-12-2021 13:20'} 253.6
{'2-12-2021 13:25'} 301.7
{'2-12-2021 13:30'} 341.4
{'2-12-2021 13:35'} 281.5
{'2-12-2021 13:40'} 545.8
{'2-12-2021 13:45'} 630
{'2-12-2021 13:50'} 624.7
{'2-12-2021 13:55'} 617.5
{'2-12-2021 14:00'} 833.5
{'2-12-2021 14:05'} 766.8
{'2-12-2021 14:10'} 662.9
{'2-12-2021 14:15'} 582
{'2-12-2021 14:20'} 970.9
{'2-12-2021 14:25'} 591.8
{'2-12-2021 14:30'} 553.6
{'2-12-2021 14:35'} 628.7
{'2-12-2021 14:40'} 527.8
{'2-12-2021 14:45'} 786.2
{'2-12-2021 14:50'} 835.2
{'2-12-2021 14:55'} 846.3
{'2-12-2021 15:00'} 766.5
{'2-12-2021 15:05'} 481.9
{'2-12-2021 15:10'} 556.2
{'2-12-2021 15:15'} 526.5
{'2-12-2021 15:20'} 236.6
{'2-12-2021 15:25'} 151.2
{'2-12-2021 15:30'} 128.2
{'2-12-2021 15:35'} 138.5
{'2-12-2021 15:40'} 200.5
{'2-12-2021 15:45'} 694
{'2-12-2021 15:50'} 814.4
{'2-12-2021 15:55'} 776.8
{'2-12-2021 16:00'} 788.3
{'2-12-2021 16:05'} 748.5
{'2-12-2021 16:10'} 687.3
{'2-12-2021 16:15'} 683.3
{'2-12-2021 16:20'} 625.7
{'2-12-2021 16:25'} 440.4
{'2-12-2021 16:30'} 170.8
{'2-12-2021 16:35'} 281.9
{'2-12-2021 16:40'} 141.3
{'2-12-2021 16:45'} 84.4
{'2-12-2021 16:50'} 56.6
{'2-12-2021 16:55'} 65.2
{'2-12-2021 17:00'} 78.4
{'2-12-2021 17:05'} 87.7
{'2-12-2021 17:10'} 100.3
{'2-12-2021 17:15'} 67.1
{'2-12-2021 17:20'} 55.2
{'2-12-2021 17:25'} 66.3
{'2-12-2021 17:30'} 67.4
{'2-12-2021 17:35'} 75.2
{'2-12-2021 17:40'} 73.6
{'2-12-2021 17:45'} 49
{'2-12-2021 17:50'} 51.7
{'2-12-2021 17:55'} 52.3
{'2-12-2021 18:00'} 41.8
{'2-12-2021 18:05'} 32.4
{'2-12-2021 18:10'} 23.7
{'2-12-2021 18:15'} 23.6
{'2-12-2021 18:20'} 29.5
{'2-12-2021 18:25'} 41.8
{'2-12-2021 18:30'} 32
{'2-12-2021 18:35'} 23.2
{'2-12-2021 18:40'} 13.3
{'2-12-2021 18:45'} 10.9
{'2-12-2021 18:50'} 11.2
{'2-12-2021 18:55'} 7.5
{'2-12-2021 19:00'} 5.3
{'2-12-2021 19:05'} 7.7
{'2-12-2021 19:10'} 6.9
{'2-12-2021 19:15'} 5.8
{'2-12-2021 19:20'} 4.4
{'2-12-2021 19:25'} 3.6
{'2-12-2021 19:30'} 2.4
{'2-12-2021 19:35'} 1.6
{'2-12-2021 19:40'} 0.9
{'2-12-2021 19:45'} 0.4
{'2-12-2021 19:50'} 0.1
{'2-12-2021 19:55'} 0
{'2-12-2021 20:00'} 0.3
{'2-12-2021 20:05'} 0.2
{'2-12-2021 20:10'} 0
{'2-12-2021 20:15'} 0
{'2-12-2021 20:20'} 0.3
{'2-12-2021 20:25'} 0.2
{'2-12-2021 20:30'} 0
{'2-12-2021 20:35'} 0
{'2-12-2021 20:40'} 0
{'2-12-2021 20:45'} 0
{'2-12-2021 20:50'} 0
{'2-12-2021 20:55'} 0
{'2-12-2021 21:00'} 0
{'2-12-2021 21:05'} 0
{'2-12-2021 21:10'} 0
{'2-12-2021 21:15'} 0
{'2-12-2021 21:20'} 0
{'2-12-2021 21:25'} 0
{'2-12-2021 21:30'} 0
{'2-12-2021 21:35'} 0
{'2-12-2021 21:40'} 0
{'2-12-2021 21:45'} 0
{'2-12-2021 21:50'} 0
{'2-12-2021 21:55'} 0
{'2-12-2021 22:00'} 0
{'2-12-2021 22:05'} 0
{'2-12-2021 22:10'} 0
{'2-12-2021 22:15'} 0
{'2-12-2021 22:20'} 0
{'2-12-2021 22:25'} 0
{'2-12-2021 22:30'} 0
{'2-12-2021 22:35'} 0
{'2-12-2021 22:40'} 0
{'2-12-2021 22:45'} 0
{'2-12-2021 22:50'} 0
{'2-12-2021 22:55'} 0
{'2-12-2021 23:00'} 0
{'2-12-2021 23:05'} 0
{'2-12-2021 23:10'} 0
{'2-12-2021 23:15'} 0
{'2-12-2021 23:20'} 0
{'2-12-2021 23:25'} 0
{'2-12-2021 23:30'} 0
{'2-12-2021 23:35'} 0
{'2-12-2021 23:40'} 0
{'2-12-2021 23:45'} 0
{'2-12-2021 23:50'} 0
{'2-12-2021 23:55'} 0
{'3-12-2021 00:00'} 0
{'3-12-2021 00:05'} 0
{'3-12-2021 00:10'} 0
{'3-12-2021 00:15'} 0
{'3-12-2021 00:20'} 0
{'3-12-2021 00:25'} 0
{'3-12-2021 00:30'} 0
{'3-12-2021 00:35'} 0
{'3-12-2021 00:40'} 0
{'3-12-2021 00:45'} 0
{'3-12-2021 00:50'} 0
{'3-12-2021 00:55'} 0
{'3-12-2021 01:00'} 0
{'3-12-2021 01:05'} 0
{'3-12-2021 01:10'} 0
{'3-12-2021 01:15'} 0
{'3-12-2021 01:20'} 0
{'3-12-2021 01:25'} 0
{'3-12-2021 01:30'} 0
{'3-12-2021 01:35'} 0
{'3-12-2021 01:40'} 0
{'3-12-2021 01:45'} 0
{'3-12-2021 01:50'} 0
{'3-12-2021 01:55'} 0
{'3-12-2021 02:00'} 0
{'3-12-2021 02:05'} 0
{'3-12-2021 02:10'} 0
{'3-12-2021 02:15'} 0
{'3-12-2021 02:20'} 0
{'3-12-2021 02:25'} 0
{'3-12-2021 02:30'} 0
{'3-12-2021 02:35'} 0
{'3-12-2021 02:40'} 0
{'3-12-2021 02:45'} 0
{'3-12-2021 02:50'} 0
{'3-12-2021 02:55'} 0
{'3-12-2021 03:00'} 0
{'3-12-2021 03:05'} 0
{'3-12-2021 03:10'} 0
{'3-12-2021 03:15'} 0
{'3-12-2021 03:20'} 0
{'3-12-2021 03:25'} 0
{'3-12-2021 03:30'} 0
{'3-12-2021 03:35'} 0
{'3-12-2021 03:40'} 0
{'3-12-2021 03:45'} 0
{'3-12-2021 03:50'} 0
{'3-12-2021 03:55'} 0
{'3-12-2021 04:00'} 0
{'3-12-2021 04:05'} 0
{'3-12-2021 04:10'} 0
{'3-12-2021 04:15'} 0
{'3-12-2021 04:20'} 0
{'3-12-2021 04:25'} 0
{'3-12-2021 04:30'} 0
{'3-12-2021 04:35'} 0
{'3-12-2021 04:40'} 0
{'3-12-2021 04:45'} 0
{'3-12-2021 04:50'} 0
{'3-12-2021 04:55'} 0
{'3-12-2021 05:00'} 0
{'3-12-2021 05:05'} 0
{'3-12-2021 05:10'} 0
{'3-12-2021 05:15'} 0
{'3-12-2021 05:20'} 0
{'3-12-2021 05:25'} 0
{'3-12-2021 05:30'} 0.3
{'3-12-2021 05:35'} 0.6
{'3-12-2021 05:40'} 1.3
{'3-12-2021 05:45'} 2.2
{'3-12-2021 05:50'} 3.1
{'3-12-2021 05:55'} 4.3
{'3-12-2021 06:00'} 5.2
{'3-12-2021 06:05'} 6.3
{'3-12-2021 06:10'} 7.3
{'3-12-2021 06:15'} 8.1
{'3-12-2021 06:20'} 8.9
{'3-12-2021 06:25'} 9.7
{'3-12-2021 06:30'} 10.2
{'3-12-2021 06:35'} 10.9
{'3-12-2021 06:40'} 11.4
{'3-12-2021 06:45'} 12
{'3-12-2021 06:50'} 12.5
{'3-12-2021 06:55'} 12.9
{'3-12-2021 07:00'} 13.3
{'3-12-2021 07:05'} 13.7
{'3-12-2021 07:10'} 14.1
{'3-12-2021 07:15'} 14.3
{'3-12-2021 07:20'} 14.8
{'3-12-2021 07:25'} 15
{'3-12-2021 07:30'} 15.4
{'3-12-2021 07:35'} 16.1
{'3-12-2021 07:40'} 16.4
{'3-12-2021 07:45'} 16.6
{'3-12-2021 07:50'} 17.2
{'3-12-2021 07:55'} 17.5
{'3-12-2021 08:00'} 17.9
{'3-12-2021 08:05'} 18.2
{'3-12-2021 08:10'} 20.8
{'3-12-2021 08:15'} 25
{'3-12-2021 08:20'} 26.1
{'3-12-2021 08:25'} 19.8
{'3-12-2021 08:30'} 22.1
{'3-12-2021 08:35'} 25.4
{'3-12-2021 08:40'} 22.6
{'3-12-2021 08:45'} 20.8
{'3-12-2021 08:50'} 23.7
{'3-12-2021 08:55'} 23.3
{'3-12-2021 09:00'} 23.7
{'3-12-2021 09:05'} 24.6
{'3-12-2021 09:10'} 26.8
{'3-12-2021 09:15'} 39.2
{'3-12-2021 09:20'} 49.2
{'3-12-2021 09:25'} 47
{'3-12-2021 09:30'} 34.4
{'3-12-2021 09:35'} 28.3
{'3-12-2021 09:40'} 28.5
{'3-12-2021 09:45'} 30.8
{'3-12-2021 09:50'} 32.6
{'3-12-2021 09:55'} 36.7
{'3-12-2021 10:00'} 65.6
{'3-12-2021 10:05'} 61.7
{'3-12-2021 10:10'} 108.4
{'3-12-2021 10:15'} 448.6
{'3-12-2021 10:20'} 547.2
{'3-12-2021 10:25'} 582.3
{'3-12-2021 10:30'} 603.3
{'3-12-2021 10:35'} 631.5
{'3-12-2021 10:40'} 651.4
{'3-12-2021 10:45'} 620.3
{'3-12-2021 10:50'} 609.1
{'3-12-2021 10:55'} 620.5
{'3-12-2021 11:00'} 544.4
{'3-12-2021 11:05'} 585
{'3-12-2021 11:10'} 590.5
{'3-12-2021 11:15'} 543.9
{'3-12-2021 11:20'} 486.4
{'3-12-2021 11:25'} 344.4
{'3-12-2021 11:30'} 229.7
{'3-12-2021 11:35'} 206.1
{'3-12-2021 11:40'} 264.2
{'3-12-2021 11:45'} 289.5
{'3-12-2021 11:50'} 279.6
{'3-12-2021 11:55'} 268.2
{'3-12-2021 12:00'} 259.5
{'3-12-2021 12:05'} 254.4
{'3-12-2021 12:10'} 248.9
{'3-12-2021 12:15'} 246.2
{'3-12-2021 12:20'} 243.6
{'3-12-2021 12:25'} 242.3
{'3-12-2021 12:30'} 237
{'3-12-2021 12:35'} 228.6
{'3-12-2021 12:40'} 220.5
{'3-12-2021 12:45'} 217.6
{'3-12-2021 12:50'} 218.2
{'3-12-2021 12:55'} 220.9
{'3-12-2021 13:00'} 225.4
{'3-12-2021 13:05'} 229.4
{'3-12-2021 13:10'} 234.7
{'3-12-2021 13:15'} 212
{'3-12-2021 13:20'} 231
{'3-12-2021 13:25'} 247.4
{'3-12-2021 13:30'} 166
{'3-12-2021 13:35'} 181.2
{'3-12-2021 13:40'} 404.6
{'3-12-2021 13:45'} 779.5
{'3-12-2021 13:50'} 888.6
{'3-12-2021 13:55'} 920.5
{'3-12-2021 14:00'} 864.4
{'3-12-2021 14:05'} 722.6
{'3-12-2021 14:10'} 659.8
{'3-12-2021 14:15'} 644
{'3-12-2021 14:20'} 953.3
{'3-12-2021 14:25'} 332.7
{'3-12-2021 14:30'} 288
{'3-12-2021 14:35'} 738.8
{'3-12-2021 14:40'} 517.3
{'3-12-2021 14:45'} 786.9
{'3-12-2021 14:50'} 844.8
{'3-12-2021 14:55'} 906.3
{'3-12-2021 15:00'} 755.2
{'3-12-2021 15:05'} 522.2
{'3-12-2021 15:10'} 625.6
{'3-12-2021 15:15'} 596.3
{'3-12-2021 15:20'} 287.9
{'3-12-2021 15:25'} 128.1
{'3-12-2021 15:30'} 119
{'3-12-2021 15:35'} 113.4
{'3-12-2021 15:40'} 112
{'3-12-2021 15:45'} 679.3
{'3-12-2021 15:50'} 785.2
{'3-12-2021 15:55'} 766.8
{'3-12-2021 16:00'} 747.9
{'3-12-2021 16:05'} 731
{'3-12-2021 16:10'} 712.6
{'3-12-2021 16:15'} 692.3
{'3-12-2021 16:20'} 671.9
{'3-12-2021 16:25'} 651.7
{'3-12-2021 16:30'} 630.6
{'3-12-2021 16:35'} 609.7
{'3-12-2021 16:40'} 589.6
{'3-12-2021 16:45'} 565.9
{'3-12-2021 16:50'} 548.7
{'3-12-2021 16:55'} 527.4
{'3-12-2021 17:00'} 509.8
{'3-12-2021 17:05'} 469.4
{'3-12-2021 17:10'} 191.8
{'3-12-2021 17:15'} 48.6
{'3-12-2021 17:20'} 45.6
{'3-12-2021 17:25'} 43.8
{'3-12-2021 17:30'} 45.5
{'3-12-2021 17:35'} 54.5
{'3-12-2021 17:40'} 49.5
{'3-12-2021 17:45'} 40.6
>> plot(A.Datetime,A.Light)
Error using plot
Invalid data argument.
Chunru
2021-12-12
Try the following:
A = readtable('08_underwater.csv', 'DatetimeType', 'text')
A.Datetime = datetime(A.Datetime, 'InputFormat', 'dd/MM/yyyy HH:mm:ss')
plot(A.Datetime,A.Light)
Sophia
2021-12-12
>> A.Datetime = datetime(A.Datetime, 'InputFormat', 'dd/MM/yyyy HH:mm:ss')
Error using datetime (line 651)
Unable to convert the text to datetime using the format 'dd/MM/yyyy HH:mm:ss'.
>> plot(A.Datetime,A.Light)
Error using plot
Invalid data argument.
Chunru
2021-12-12
You are using a different data file from what you posted. The datetime format uses '-' instead of '/'. Change that and try again.
datetime('3-12-2021 17:45', 'InputFormat', 'dd-MM-yyyy HH:mm:ss')
ans = datetime
03-Dec-2021 17:45:00
Sophia
2021-12-12
>> opts = detectImportOptions('08_underwater.csv')
opts =
DelimitedTextImportOptions with properties:
Format Properties:
Delimiter: {','}
Whitespace: '\b\t '
LineEnding: {'\n' '\r' '\r\n'}
CommentStyle: {}
ConsecutiveDelimitersRule: 'split'
LeadingDelimitersRule: 'keep'
TrailingDelimitersRule: 'ignore'
EmptyLineRule: 'skip'
Encoding: 'UTF-8'
Replacement Properties:
MissingRule: 'fill'
ImportErrorRule: 'fill'
ExtraColumnsRule: 'addvars'
Variable Import Properties: Set types by name using setvartype
VariableNames: {'Datetime', 'Light'}
VariableTypes: {'datetime', 'double'}
SelectedVariableNames: {'Datetime', 'Light'}
VariableOptions: Show all 2 VariableOptions
Access VariableOptions sub-properties using setvaropts/getvaropts
VariableNamingRule: 'modify'
Location Properties:
DataLines: [2 Inf]
VariableNamesLine: 1
RowNamesColumn: 0
VariableUnitsLine: 0
VariableDescriptionsLine: 0
To display a preview of the table, use preview
>> opts = setvaropts(opts, 'Datetime', 'InputFormat', 'dd/MM/uuuu HH:mm:ss')
opts =
DelimitedTextImportOptions with properties:
Format Properties:
Delimiter: {','}
Whitespace: '\b\t '
LineEnding: {'\n' '\r' '\r\n'}
CommentStyle: {}
ConsecutiveDelimitersRule: 'split'
LeadingDelimitersRule: 'keep'
TrailingDelimitersRule: 'ignore'
EmptyLineRule: 'skip'
Encoding: 'UTF-8'
Replacement Properties:
MissingRule: 'fill'
ImportErrorRule: 'fill'
ExtraColumnsRule: 'addvars'
Variable Import Properties: Set types by name using setvartype
VariableNames: {'Datetime', 'Light'}
VariableTypes: {'datetime', 'double'}
SelectedVariableNames: {'Datetime', 'Light'}
VariableOptions: Show all 2 VariableOptions
Access VariableOptions sub-properties using setvaropts/getvaropts
VariableNamingRule: 'modify'
Location Properties:
DataLines: [2 Inf]
VariableNamesLine: 1
RowNamesColumn: 0
VariableUnitsLine: 0
VariableDescriptionsLine: 0
To display a preview of the table, use preview
>> A = readtable('08_underwater.csv', opts)
Warning: Unable to convert one or more variables to datetime. Specify the correct InputFormat
and DatetimeLocale properties in the DatetimeVariableImportOptions.
> In matlab.io.internal.builders/TableBuilder/build (line 47)
In matlab.io.internal.readers/TextDataReader/read (line 122)
In matlab.io.internal.functions/ReadTableWithImportOptionsText/executeImpl (line 61)
In matlab.io.internal.functions/ReadTableWithImportOptions/executeImpl (line 25)
In matlab.io.internal.functions/ReadTableWithImportOptionsText/execute (line 66)
In matlab.io.internal.functions/ReadTableWithImportOptions/execute (line 45)
In matlab.io.internal.functions/ExecutableFunction/validateAndExecute (line 102)
In matlab.io/ImportOptions/readtable (line 671)
A =
675×2 table
Datetime Light
________ _____
NaT 100.6
NaT 111.4
NaT 106.2
NaT 86.2
NaT 87.3
NaT 88.8
NaT 100.5
NaT 110.5
NaT 124
NaT 137.3
NaT 143.4
NaT 150.6
NaT 159.7
NaT 152.7
NaT 134.4
NaT 106.8
NaT 116.2
NaT 124.5
NaT 136.2
NaT 142.6
NaT 141.8
NaT 122.1
NaT 139.7
NaT 203.4
NaT 278.3
NaT 321.8
NaT 254
NaT 165.5
NaT 128.4
NaT 116.9
NaT 151.5
NaT 180.4
NaT 160.5
NaT 148
NaT 166
NaT 181.6
NaT 171.1
NaT 152.9
NaT 144.3
NaT 147.1
NaT 166.6
NaT 172.2
NaT 174.4
NaT 150.6
NaT 113
NaT 66.4
NaT 121.8
NaT 123.8
NaT 294.3
NaT 465.9
NaT 268.3
NaT 190.4
NaT 146.3
NaT 206
NaT 130.9
NaT 86.6
NaT 125.7
NaT 166.4
NaT 183.9
NaT 144.2
NaT 130.7
NaT 129.8
NaT 103.1
NaT 123.4
NaT 147.7
NaT 134.2
NaT 143
NaT 153.2
NaT 146.1
NaT 152.5
NaT 148.1
NaT 158.2
NaT 184.7
NaT 173.4
NaT 198.8
NaT 186.6
NaT 193.8
NaT 211.9
NaT 220.8
NaT 132.6
NaT 133.6
NaT 200.1
NaT 133.6
NaT 121
NaT 142.9
NaT 78.2
NaT 61.5
NaT 66.5
NaT 50.3
NaT 52.1
NaT 65.9
NaT 58.3
NaT 63.9
NaT 55.1
NaT 54
NaT 50.8
NaT 52.7
NaT 38.8
NaT 33.6
NaT 42.9
NaT 51.6
NaT 31.9
NaT 35.7
NaT 28.2
NaT 18.1
NaT 20.5
NaT 11.7
NaT 13.4
NaT 11.3
NaT 9.8
NaT 7.6
NaT 8.4
NaT 5.7
NaT 4.4
NaT 3.5
NaT 4.2
NaT 3.6
NaT 2.8
NaT 1.9
NaT 1.5
NaT 1
NaT 0.7
NaT 0.4
NaT 0.1
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0.2
NaT 0.3
NaT 0.2
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0.2
NaT 0.5
NaT 1.2
NaT 2
NaT 3.1
NaT 4.2
NaT 5.3
NaT 6.4
NaT 7.6
NaT 8.2
NaT 9.2
NaT 9.8
NaT 10.5
NaT 11.1
NaT 11.5
NaT 12.3
NaT 12.5
NaT 12.9
NaT 13.3
NaT 13.7
NaT 14.1
NaT 14.4
NaT 14.9
NaT 15.2
NaT 15.7
NaT 16.6
NaT 16.8
NaT 18.3
NaT 18.6
NaT 18.6
NaT 24.3
NaT 30.7
NaT 30
NaT 34.7
NaT 38
NaT 48.5
NaT 53.8
NaT 82.7
NaT 63.8
NaT 60.1
NaT 44.3
NaT 28.8
NaT 29.1
NaT 33.1
NaT 45.7
NaT 61.2
NaT 74.1
NaT 125.2
NaT 149.6
NaT 164.9
NaT 154.7
NaT 126.8
NaT 105.6
NaT 143.2
NaT 144.3
NaT 154.3
NaT 228.8
NaT 334.9
NaT 390.7
NaT 215.1
NaT 158.1
NaT 281.1
NaT 382.6
NaT 186.2
NaT 467
NaT 424.7
NaT 601.9
NaT 479.3
NaT 443.4
NaT 247.2
NaT 249
NaT 219.6
NaT 242.9
NaT 255.6
NaT 327.3
NaT 342.5
NaT 349.2
NaT 297.8
NaT 289.1
NaT 268.9
NaT 258.2
NaT 249
NaT 245.2
NaT 247.5
NaT 252.5
NaT 267
NaT 276.1
NaT 283.9
NaT 247.2
NaT 241.7
NaT 233.8
NaT 232
NaT 244.2
NaT 207.5
NaT 253.6
NaT 301.7
NaT 341.4
NaT 281.5
NaT 545.8
NaT 630
NaT 624.7
NaT 617.5
NaT 833.5
NaT 766.8
NaT 662.9
NaT 582
NaT 970.9
NaT 591.8
NaT 553.6
NaT 628.7
NaT 527.8
NaT 786.2
NaT 835.2
NaT 846.3
NaT 766.5
NaT 481.9
NaT 556.2
NaT 526.5
NaT 236.6
NaT 151.2
NaT 128.2
NaT 138.5
NaT 200.5
NaT 694
NaT 814.4
NaT 776.8
NaT 788.3
NaT 748.5
NaT 687.3
NaT 683.3
NaT 625.7
NaT 440.4
NaT 170.8
NaT 281.9
NaT 141.3
NaT 84.4
NaT 56.6
NaT 65.2
NaT 78.4
NaT 87.7
NaT 100.3
NaT 67.1
NaT 55.2
NaT 66.3
NaT 67.4
NaT 75.2
NaT 73.6
NaT 49
NaT 51.7
NaT 52.3
NaT 41.8
NaT 32.4
NaT 23.7
NaT 23.6
NaT 29.5
NaT 41.8
NaT 32
NaT 23.2
NaT 13.3
NaT 10.9
NaT 11.2
NaT 7.5
NaT 5.3
NaT 7.7
NaT 6.9
NaT 5.8
NaT 4.4
NaT 3.6
NaT 2.4
NaT 1.6
NaT 0.9
NaT 0.4
NaT 0.1
NaT 0
NaT 0.3
NaT 0.2
NaT 0
NaT 0
NaT 0.3
NaT 0.2
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0
NaT 0.3
NaT 0.6
NaT 1.3
NaT 2.2
NaT 3.1
NaT 4.3
NaT 5.2
NaT 6.3
NaT 7.3
NaT 8.1
NaT 8.9
NaT 9.7
NaT 10.2
NaT 10.9
NaT 11.4
NaT 12
NaT 12.5
NaT 12.9
NaT 13.3
NaT 13.7
NaT 14.1
NaT 14.3
NaT 14.8
NaT 15
NaT 15.4
NaT 16.1
NaT 16.4
NaT 16.6
NaT 17.2
NaT 17.5
NaT 17.9
NaT 18.2
NaT 20.8
NaT 25
NaT 26.1
NaT 19.8
NaT 22.1
NaT 25.4
NaT 22.6
NaT 20.8
NaT 23.7
NaT 23.3
NaT 23.7
NaT 24.6
NaT 26.8
NaT 39.2
NaT 49.2
NaT 47
NaT 34.4
NaT 28.3
NaT 28.5
NaT 30.8
NaT 32.6
NaT 36.7
NaT 65.6
NaT 61.7
NaT 108.4
NaT 448.6
NaT 547.2
NaT 582.3
NaT 603.3
NaT 631.5
NaT 651.4
NaT 620.3
NaT 609.1
NaT 620.5
NaT 544.4
NaT 585
NaT 590.5
NaT 543.9
NaT 486.4
NaT 344.4
NaT 229.7
NaT 206.1
NaT 264.2
NaT 289.5
NaT 279.6
NaT 268.2
NaT 259.5
NaT 254.4
NaT 248.9
NaT 246.2
NaT 243.6
NaT 242.3
NaT 237
NaT 228.6
NaT 220.5
NaT 217.6
NaT 218.2
NaT 220.9
NaT 225.4
NaT 229.4
NaT 234.7
NaT 212
NaT 231
NaT 247.4
NaT 166
NaT 181.2
NaT 404.6
NaT 779.5
NaT 888.6
NaT 920.5
NaT 864.4
NaT 722.6
NaT 659.8
NaT 644
NaT 953.3
NaT 332.7
NaT 288
NaT 738.8
NaT 517.3
NaT 786.9
NaT 844.8
NaT 906.3
NaT 755.2
NaT 522.2
NaT 625.6
NaT 596.3
NaT 287.9
NaT 128.1
NaT 119
NaT 113.4
NaT 112
NaT 679.3
NaT 785.2
NaT 766.8
NaT 747.9
NaT 731
NaT 712.6
NaT 692.3
NaT 671.9
NaT 651.7
NaT 630.6
NaT 609.7
NaT 589.6
NaT 565.9
NaT 548.7
NaT 527.4
NaT 509.8
NaT 469.4
NaT 191.8
NaT 48.6
NaT 45.6
NaT 43.8
NaT 45.5
NaT 54.5
NaT 49.5
NaT 40.6
>> plot(A.Datetime,A.Light)
Chunru
2021-12-13
Use the same data and code here.
opts = detectImportOptions('08_underwater.csv');
opts = setvaropts(opts, 'Datetime', 'InputFormat', 'dd/MM/uuuu HH:mm');
% type 08_underwater.csv
A = readtable('08_underwater.csv', opts);
plot(A.Datetime,A.Light)
另请参阅
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)