Merge branch 'main' of https://git.fasttube.de/t.korjakow/ft24_pacejka_tyre
This commit is contained in:
commit
ea33affc84
15
scripts/getSubdirectories.m
Normal file
15
scripts/getSubdirectories.m
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
function subdirectories = getSubdirectories(directoryPath)
|
||||||
|
% Check if the input is a valid directory
|
||||||
|
if ~isfolder(directoryPath)
|
||||||
|
error('Input is not a valid directory.');
|
||||||
|
end
|
||||||
|
|
||||||
|
% Get a list of all items in the directory
|
||||||
|
items = dir(directoryPath);
|
||||||
|
|
||||||
|
% Filter out non-directory items
|
||||||
|
subdirectories = {items([items.isdir]).name};
|
||||||
|
|
||||||
|
% Remove '.' and '..' from the list
|
||||||
|
subdirectories = subdirectories(~ismember(subdirectories, {'.', '..'}));
|
||||||
|
end
|
38
scripts/similarities.m
Normal file
38
scripts/similarities.m
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
%% please open Magic Formular APP first
|
||||||
|
clear
|
||||||
|
n = 20; % <=60
|
||||||
|
%%
|
||||||
|
directoryPath = "..\sorted_data";
|
||||||
|
subdirectories = getSubdirectories(directoryPath);
|
||||||
|
%%
|
||||||
|
% Use the dir function to get information about files and directories
|
||||||
|
contents = dir(directoryPath);
|
||||||
|
|
||||||
|
% Filter out the directories (excluding '.' and '..')
|
||||||
|
subdirectories_list = contents([contents.isdir] & ~ismember({contents.name}, {'.', '..'}));
|
||||||
|
|
||||||
|
% Extract and display the names of the subdirectories
|
||||||
|
subdirectoryNames = {subdirectories_list.name};
|
||||||
|
%%
|
||||||
|
figure()
|
||||||
|
|
||||||
|
for i=1:length(subdirectories)
|
||||||
|
fileMeasurement = fullfile("..\sorted_data", subdirectories{i}, "\cornering.mat");
|
||||||
|
parser = tydex.parsers.FSAETTC_SI_ISO_Mat();
|
||||||
|
measurements = parser.run(fileMeasurement);
|
||||||
|
measurement = measurements(n);
|
||||||
|
|
||||||
|
[SX,SA,FZ,IP,IA,VX,FX,FY,MZ,MY,MX,W,T] = unpack(measurement);
|
||||||
|
if i < length(subdirectories)/3
|
||||||
|
plot(SA, FY, 'LineWidth', 1)
|
||||||
|
elseif i <= length(subdirectories)/3*2
|
||||||
|
plot(SA, FY, '--','LineWidth', 1)
|
||||||
|
else
|
||||||
|
plot(SA, FY, '-.','LineWidth', 1)
|
||||||
|
end
|
||||||
|
hold on
|
||||||
|
end
|
||||||
|
legend(subdirectoryNames{:})
|
||||||
|
title("Similarities, n=",n)
|
||||||
|
xlabel("Slip Angle")
|
||||||
|
ylabel("FY")
|
BIN
scripts/similarities.png
Normal file
BIN
scripts/similarities.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 385 KiB |
Loading…
x
Reference in New Issue
Block a user