I have data in seconds of each year, how to make continuous data for few years to plot as variable (Vx, Vy) Vs year

1 次查看(过去 30 天)
I have data in seconds of each year, how to make continuous data for few years to plot variable (Vx, Vy) Vs year. Here some data are from 2008, 2009 and 2010
sample data:
Year Time_Sec Vx Vy
2008 31452900.000000 -294.000 1.60000
2008 31453200.000000 -294.200 2.00000
2008 31453500.000000 -295.500 1.40000
2008 31453800.000000 -294.600 1.30000
2008 31454100.000000 -293.500 4.40000
2008 31454400.000000 -293.300 3.60000
2008 31454700.000000 -295.900 1.10000
2008 31455000.000000 -296.900 -1.70000
2008 31539600.000000 -340.200 -17.0000
2008 31539900.000000 -347.100 0.600000
2008 31540200.000000 -351.100 16.2000
2008 31540500.000000 -350.400 9.70000
2008 31540800.000000 -354.700 11.9000
2008 31541100.000000 -352.700 8.70000
2008 31541400.000000 -359.900 2.40000
2008 31541700.000000 -366.300 9.90000
2008 31542000.000000 -364.200 7.70000
2008 31542300.000000 -365.500 10.7000
2008 31542600.000000 -364.700 9.50000
2008 31542900.000000 -363.000 14.3000
2008 31543200.000000 -361.700 16.5000
2008 31543500.000000 -370.600 21.0000
2008 31543800.000000 -372.500 29.9000
2008 31544100.000000 -377.900 27.9000
2008 31544400.000000 -381.400 32.8000
2008 31544700.000000 -384.100 34.8000
2008 31545000.000000 -379.600 26.6000
2008 31545300.000000 -378.400 33.4000
2008 31615500.000000 -506.900 17.6000
2008 31615800.000000 -508.000 9.70000
2008 31616100.000000 -502.700 14.6000
2008 31616400.000000 -495.500 26.3000
2008 31616700.000000 -489.600 28.3000
2008 31617000.000000 -487.600 20.2000
2008 31617300.000000 -494.900 19.7000
2008 31617600.000000 -493.600 20.3000
2008 31617900.000000 -492.300 27.5000
2008 31618200.000000 -489.200 29.3000
2008 31618500.000000 -487.900 22.2000
2008 31618800.000000 -489.700 20.2000
2008 31619100.000000 -488.100 17.4000
2008 31619400.000000 -488.300 18.7000
2008 31619700.000000 -494.800 15.9000
2008 31620000.000000 -493.900 6.50000
2008 31620300.000000 -505.500 5.70000
2008 31620600.000000 -507.300 0.900000
2008 31620900.000000 -507.900 2.00000
2008 31621200.000000 -506.900 4.50000
2008 31621500.000000 -507.600 4.00000
2008 31621800.000000 -507.200 4.00000
2008 31622100.000000 -504.500 5.60000
2009 0.000000 -508.100 6.60000
2009 300.000000 -508.200 4.90000
2009 600.000000 -509.600 7.50000
2009 900.000000 -509.800 6.70000
2009 1200.000000 -506.700 14.0000
2009 1500.000000 -499.100 18.2000
2009 1800.000000 -502.200 12.8000
2009 2100.000000 -509.200 14.0000
2009 2400.000000 -512.900 4.70000
2009 2700.000000 -511.800 2.40000
2009 3000.000000 -513.000 4.70000
2009 3300.000000 -511.000 8.40000
2009 3600.000000 -508.800 12.8000
2009 3900.000000 -512.600 15.3000
2009 4200.000000 -514.000 26.6000
2009 4500.000000 -513.900 15.4000
2009 4800.000000 -510.500 10.8000
2009 5100.000000 -511.300 17.2000
2009 5400.000000 -516.600 21.4000
2009 5700.000000 -518.800 19.9000
2009 6000.000000 -518.200 15.5000
2009 6300.000000 -514.300 9.80000
2009 6600.000000 -514.600 7.60000
2009 6900.000000 -516.000 5.90000
2009 7200.000000 -515.700 4.00000
2009 7500.000000 -518.500 -3.70000
2009 7800.000000 -520.500 -2.30000
2009 8100.000000 -516.800 -6.80000
2009 8400.000000 -515.100 -7.50000
2009 8700.000000 -520.200 -0.600000
2009 9000.000000 -516.200 -6.10000
2009 9300.000000 -506.700 -9.00000
2009 9600.000000 -505.900 -10.4000
2009 9900.000000 -505.800 -11.0000
2009 10200.000000 -509.100 -12.1000
2009 10500.000000 -511.700 -10.6000
2009 10800.000000 -516.900 -13.2000
2009 11100.000000 -523.900 -9.20000
2009 11400.000000 -513.600 -11.1000
2009 11700.000000 -504.800 -8.20000
2009 12000.000000 -503.800 -7.60000
2009 12300.000000 -501.000 -9.00000
2009 12600.000000 -505.400 -10.7000
2009 12900.000000 -509.800 -9.00000
2009 13200.000000 -507.100 -9.90000
2009 13500.000000 -506.500 -11.9000
2009 13800.000000 -504.400 -11.2000
2009 14100.000000 -504.300 -12.1000
2009 14400.000000 -501.900 -10.8000
2009 14700.000000 -502.000 -10.0000
2009 15000.000000 -501.100 -10.7000
2009 15300.000000 -506.300 -9.10000
2009 15600.000000 -502.900 -3.60000
2009 15900.000000 -500.000 -5.50000
2009 16200.000000 -498.400 -0.500000
2009 16500.000000 -502.300 3.70000
2009 16800.000000 -503.800 3.40000
2009 17100.000000 -505.200 6.40000
2009 17400.000000 -512.300 12.9000
2009 17700.000000 -505.800 12.8000
2009 18000.000000 -505.400 9.80000
2009 18300.000000 -504.500 7.30000
2009 18600.000000 -503.400 9.20000
2009 18900.000000 -501.600 8.40000
2009 19200.000000 -501.300 5.40000
2009 19500.000000 -501.800 10.1000
2009 19800.000000 -503.000 7.40000
2009 20100.000000 -499.000 7.00000
2009 20400.000000 -501.200 7.60000
2009 20700.000000 -501.600 21.3000
2009 21000.000000 -502.200 20.8000
2009 21300.000000 -502.200 19.6000
2009 21600.000000 -496.700 18.0000
2009 21900.000000 -491.300 11.2000
2009 22200.000000 -484.000 7.70000
2009 22500.000000 -501.600 10.7000
2009 22800.000000 -505.600 5.40000
2010 0.000000 -508.100 6.60000
2010 300.000000 -508.200 4.90000
2010 600.000000 -509.600 7.50000
2010 900.000000 -509.800 6.70000
2010 1200.000000 -506.700 14.0000
2010 1500.000000 -499.100 18.2000
2010 1800.000000 -502.200 12.8000
2010 2100.000000 -509.200 14.0000
2010 2400.000000 -512.900 4.70000
2010 2700.000000 -511.800 2.40000

回答(1 个)

Voss
Voss 2022-4-18
data = readmatrix('Ask.txt');
t = datetime(data(:,1),1,1) + seconds(data(:,2));
disp(t); % big jump from 01-Jan-2009 06:20:00 to 01-Jan-2010 00:00:00
30-Dec-2008 00:55:00 30-Dec-2008 01:00:00 30-Dec-2008 01:05:00 30-Dec-2008 01:10:00 30-Dec-2008 01:15:00 30-Dec-2008 01:20:00 30-Dec-2008 01:25:00 30-Dec-2008 01:30:00 31-Dec-2008 01:00:00 31-Dec-2008 01:05:00 31-Dec-2008 01:10:00 31-Dec-2008 01:15:00 31-Dec-2008 01:20:00 31-Dec-2008 01:25:00 31-Dec-2008 01:30:00 31-Dec-2008 01:35:00 31-Dec-2008 01:40:00 31-Dec-2008 01:45:00 31-Dec-2008 01:50:00 31-Dec-2008 01:55:00 31-Dec-2008 02:00:00 31-Dec-2008 02:05:00 31-Dec-2008 02:10:00 31-Dec-2008 02:15:00 31-Dec-2008 02:20:00 31-Dec-2008 02:25:00 31-Dec-2008 02:30:00 31-Dec-2008 02:35:00 31-Dec-2008 22:05:00 31-Dec-2008 22:10:00 31-Dec-2008 22:15:00 31-Dec-2008 22:20:00 31-Dec-2008 22:25:00 31-Dec-2008 22:30:00 31-Dec-2008 22:35:00 31-Dec-2008 22:40:00 31-Dec-2008 22:45:00 31-Dec-2008 22:50:00 31-Dec-2008 22:55:00 31-Dec-2008 23:00:00 31-Dec-2008 23:05:00 31-Dec-2008 23:10:00 31-Dec-2008 23:15:00 31-Dec-2008 23:20:00 31-Dec-2008 23:25:00 31-Dec-2008 23:30:00 31-Dec-2008 23:35:00 31-Dec-2008 23:40:00 31-Dec-2008 23:45:00 31-Dec-2008 23:50:00 31-Dec-2008 23:55:00 01-Jan-2009 00:00:00 01-Jan-2009 00:05:00 01-Jan-2009 00:10:00 01-Jan-2009 00:15:00 01-Jan-2009 00:20:00 01-Jan-2009 00:25:00 01-Jan-2009 00:30:00 01-Jan-2009 00:35:00 01-Jan-2009 00:40:00 01-Jan-2009 00:45:00 01-Jan-2009 00:50:00 01-Jan-2009 00:55:00 01-Jan-2009 01:00:00 01-Jan-2009 01:05:00 01-Jan-2009 01:10:00 01-Jan-2009 01:15:00 01-Jan-2009 01:20:00 01-Jan-2009 01:25:00 01-Jan-2009 01:30:00 01-Jan-2009 01:35:00 01-Jan-2009 01:40:00 01-Jan-2009 01:45:00 01-Jan-2009 01:50:00 01-Jan-2009 01:55:00 01-Jan-2009 02:00:00 01-Jan-2009 02:05:00 01-Jan-2009 02:10:00 01-Jan-2009 02:15:00 01-Jan-2009 02:20:00 01-Jan-2009 02:25:00 01-Jan-2009 02:30:00 01-Jan-2009 02:35:00 01-Jan-2009 02:40:00 01-Jan-2009 02:45:00 01-Jan-2009 02:50:00 01-Jan-2009 02:55:00 01-Jan-2009 03:00:00 01-Jan-2009 03:05:00 01-Jan-2009 03:10:00 01-Jan-2009 03:15:00 01-Jan-2009 03:20:00 01-Jan-2009 03:25:00 01-Jan-2009 03:30:00 01-Jan-2009 03:35:00 01-Jan-2009 03:40:00 01-Jan-2009 03:45:00 01-Jan-2009 03:50:00 01-Jan-2009 03:55:00 01-Jan-2009 04:00:00 01-Jan-2009 04:05:00 01-Jan-2009 04:10:00 01-Jan-2009 04:15:00 01-Jan-2009 04:20:00 01-Jan-2009 04:25:00 01-Jan-2009 04:30:00 01-Jan-2009 04:35:00 01-Jan-2009 04:40:00 01-Jan-2009 04:45:00 01-Jan-2009 04:50:00 01-Jan-2009 04:55:00 01-Jan-2009 05:00:00 01-Jan-2009 05:05:00 01-Jan-2009 05:10:00 01-Jan-2009 05:15:00 01-Jan-2009 05:20:00 01-Jan-2009 05:25:00 01-Jan-2009 05:30:00 01-Jan-2009 05:35:00 01-Jan-2009 05:40:00 01-Jan-2009 05:45:00 01-Jan-2009 05:50:00 01-Jan-2009 05:55:00 01-Jan-2009 06:00:00 01-Jan-2009 06:05:00 01-Jan-2009 06:10:00 01-Jan-2009 06:15:00 01-Jan-2009 06:20:00 01-Jan-2010 00:00:00 01-Jan-2010 00:05:00 01-Jan-2010 00:10:00 01-Jan-2010 00:15:00 01-Jan-2010 00:20:00 01-Jan-2010 00:25:00 01-Jan-2010 00:30:00 01-Jan-2010 00:35:00 01-Jan-2010 00:40:00 01-Jan-2010 00:45:00
plot(t,data(:,[3 4]));
legend({'Vx' 'Vy'});

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by