update selectSide() algorithm, fix plot.m

This commit is contained in:
Erick
2022-01-31 22:49:31 +01:00
parent 7b4ac57b94
commit 77162b3c3a
4 changed files with 28 additions and 11 deletions
+19
View File
@@ -0,0 +1,19 @@
selectSide(front);
%selectSide(rear);
fields = fieldnames(FileData);
fields = fieldnames(FileData);
for K = 1 : length(fields)
thisvar = fields{K};
thisdata = FileData.(thisvar);
if ~isnumeric(thisdata)
warning('Skipping field %s which is type %s instead of numeric', thisvar, class(thisvar))
else
if carSide == 'front'
thisfile = sprintf('Front_%s.csv', thisvar);
else
thisfile = sprintf('Rear_%s.csv', thisvar);
end
csvwrite(thisfile, thisdata);
end
end