38 lines
1.2 KiB
Mathematica
38 lines
1.2 KiB
Mathematica
|
%% 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")
|