most things should work now
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
function [outputArg] = plot_driver_steering(panel, selected_laps, pltData)
|
||||
function [outputArg] = plot_driver_steering(panel, start, stop, pltData)
|
||||
% create tiledlayout (R2023a and newer)
|
||||
tl = tiledlayout(panel,"vertical");
|
||||
|
||||
@ -7,17 +7,13 @@ function [outputArg] = plot_driver_steering(panel, selected_laps, pltData)
|
||||
hold(ax1, "on")
|
||||
grid(ax1, "on")
|
||||
title(ax1, "Speed [km/h]")
|
||||
for i = 1:length(selected_laps)
|
||||
plot(ax1,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).speed_kph)
|
||||
end
|
||||
plot(ax1,pltData.xAxis(start:stop),pltData.speed_kph(start:stop))
|
||||
% plot 2: steering angle [°]
|
||||
ax2 = nexttile(tl);
|
||||
hold(ax2, "on")
|
||||
grid(ax2, "on")
|
||||
title(ax2, "Steering Angle [°]")
|
||||
for i = 1:length(selected_laps)
|
||||
plot(ax2,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).steering_deg)
|
||||
end
|
||||
plot(ax2,pltData.xAxis(start:stop),pltData.steering_deg(start:stop))
|
||||
% plot 3: oversteer
|
||||
ax3 = nexttile(tl);
|
||||
hold(ax3, "on")
|
||||
@ -30,9 +26,7 @@ function [outputArg] = plot_driver_steering(panel, selected_laps, pltData)
|
||||
hold(ax4, "on")
|
||||
grid(ax4, "on")
|
||||
title(ax4, "Lateral Acc [g]")
|
||||
for i = 1:length(selected_laps)
|
||||
plot(ax4,pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).acc_lat_g)
|
||||
end
|
||||
plot(ax4,pltData.xAxis(start:stop),pltData.acc_lat_g)(start:stop)
|
||||
% link all x axes
|
||||
linkaxes([ax1, ax2, ax3, ax4],"x")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user