update selectSide() algorithm, fix plot.m
This commit is contained in:
@@ -1,14 +1,6 @@
|
|||||||
selectSide(front);
|
selectSide(front);
|
||||||
%selectSide(rear);
|
%selectSide(rear);
|
||||||
|
|
||||||
if carSide == 'front'
|
|
||||||
FileData = load('M22H_FrontSuspension_Data.mat');
|
|
||||||
elseif carSide == 'rear'
|
|
||||||
FileData = load('M22H_RearSuspension_Data.mat');
|
|
||||||
else
|
|
||||||
error('Error: %s is not a valid input', carSide)
|
|
||||||
end
|
|
||||||
|
|
||||||
fields = fieldnames(FileData);
|
fields = fieldnames(FileData);
|
||||||
fields = fieldnames(FileData);
|
fields = fieldnames(FileData);
|
||||||
for K = 1 : length(fields)
|
for K = 1 : length(fields)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
selectSide('front');
|
||||||
|
%selectSide('rear');
|
||||||
|
|
||||||
|
% left and right data are identical
|
||||||
|
% this piece of code works regardless of car side
|
||||||
|
camber = fplot(CamberLeft)
|
||||||
|
toe = fplot(ToeLeft)
|
||||||
|
caster = fplot(CasterLeft)
|
||||||
|
kpi = fplot(KingpinLeft)
|
||||||
|
AntiDiveLeft =
|
||||||
|
|
||||||
|
ackermann
|
||||||
@@ -1,3 +1,14 @@
|
|||||||
load('M22H_RearSuspension_Data.mat');
|
selectSide('front');
|
||||||
|
%selectSide('rear');
|
||||||
|
|
||||||
f = fplot(CamberLeft)
|
% left and right data are identical
|
||||||
|
% this piece of code works regardless of car side
|
||||||
|
camber = fplot(CamberLeft)
|
||||||
|
toe = fplot(ToeLeft)
|
||||||
|
caster = fplot(CasterLeft)
|
||||||
|
kpi = fplot(KingpinLeft)
|
||||||
|
antidive = fplot(AntiDiveLeft)
|
||||||
|
|
||||||
|
if carSide == 'front'
|
||||||
|
Ackermann = fplot(AckermannLeft)
|
||||||
|
end
|
||||||
|
|||||||
+3
-1
@@ -6,8 +6,10 @@ fileName = 'SuspensionData_Exported.xlsx';
|
|||||||
|
|
||||||
if rem(input, 2) == 1
|
if rem(input, 2) == 1
|
||||||
carSide = 'front';
|
carSide = 'front';
|
||||||
|
FileData = load('M22H_FrontSuspension_Data.mat');
|
||||||
elseif rem(input, 2) == 0
|
elseif rem(input, 2) == 0
|
||||||
carSide = 'rear';
|
carSide = 'rear';
|
||||||
|
FileData = load('M22H_RearSuspension_Data.mat');
|
||||||
else
|
else
|
||||||
fprintf = 'An error occured!';
|
error('Error: %s is not a valid input', carSide)
|
||||||
end;
|
end;
|
||||||
Reference in New Issue
Block a user