42 lines
1.4 KiB
Matlab
42 lines
1.4 KiB
Matlab
function [outputArg] = plot_suspension_velocities(panel, selected_laps, pltData)
|
|
% create tiledlayout (R2023a and newer)
|
|
tl = tiledlayout(panel,"vertical");
|
|
% plot 1: velocity heave front [mm/s]
|
|
ax1 = nexttile(tl);
|
|
hold(ax1, "on")
|
|
grid(ax1, "on")
|
|
title(ax1, "Heave Front [mm/s]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax1, pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).velocityHeaveFront_mmps)
|
|
end
|
|
% plot 2: velocity roll front [mm/s]
|
|
ax2 = nexttile(tl);
|
|
hold(ax2, "on")
|
|
grid(ax2, "on")
|
|
title(ax2, "Roll Front [mm/s]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax2, pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).velocityRollFront_mmps)
|
|
end
|
|
% plot 3: velocity heave front [mm/s]
|
|
ax3 = nexttile(tl);
|
|
hold(ax3, "on")
|
|
grid(ax3, "on")
|
|
title(ax3, "Heave Rear [mm/s]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax3, pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).velocityHeaveRear_mmps)
|
|
end
|
|
% plot 4: velocity roll front [mm/s]
|
|
ax4 = nexttile(tl);
|
|
hold(ax4, "on")
|
|
grid(ax4, "on")
|
|
title(ax4, "Roll Rear [mm/s]")
|
|
for i = 1:length(selected_laps)
|
|
plot(ax4, pltData(selected_laps(i)).xAxis, pltData(selected_laps(i)).velocityRollRear_mmps)
|
|
end
|
|
linkaxes([ax1, ax2, ax3, ax4],"x")
|
|
|
|
% return null (not relevant for plots!)
|
|
outputArg = [];
|
|
end
|
|
|