Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Car = csvread('C:\Users\Роман\Downloads\Универ\6сем\SNAR\HW_3\data1.csv');
- a = size(Car);
- time1 = Car(2 : a(1), 1) - Car(2,1);
- speed_x = [];
- speed_y = [];
- time2 = [];
- for i = 2:a(1)
- time2(i) = Car(i, 1) - Car(2,1);
- speed_x(i) = abs(sin(Car(i, 8))) * Car(i, 14); #x
- speed_y(i) = abs(cos(Car(i, 8))) * Car(i, 14); #y
- endfor
- subplot(2,1,1)
- hold on;
- grid on;
- xlabel('time, m', 'fontsize', 20);
- ylabel('OBD, km/h', 'fontsize', 20);
- title('OBD', 'fontsize', 24);
- plot(time2, speed_x, 'linewidth', 3);
- legend('speed');
- subplot(2,1,2)
- hold on;
- grid on;
- xlabel('time, m', 'fontsize', 20);
- ylabel('GPS, km/h', 'fontsize', 20);
- title('GPS', 'fontsize', 24);
- plot(time2, speed_y, 'linewidth', 3);
- legend('speed');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement