created function

This commit is contained in:
Erick
2022-01-28 23:53:54 +01:00
parent 3107ec9d9e
commit bc0806843d
5 changed files with 45 additions and 34 deletions
+18
View File
@@ -0,0 +1,18 @@
function [content, filename, sheetName] = selectSide(input);
%0 is front, 1 is rear
if rem(input, 2) == 0
content = who('-file', 'M22H_FrontSuspension_Data.mat');
filename = 'FrontSuspension_Exported.xlsx';
sheetName = 'Front';
elseif input/2 != 0
content = who('-file', 'M22H_RearSuspension_Data.mat');
filename = 'RearSuspension_Exported.xlsx';
sheetName = 'Rear';
else
fprintf = 'Input must be "front" or "rear";
break;
end;