diff --git a/app2.mlapp b/app2.mlapp new file mode 100644 index 0000000..a794c14 Binary files /dev/null and b/app2.mlapp differ diff --git a/functions/SLS_FL.m b/functions/SLS_FL.m new file mode 100644 index 0000000..badf1ce --- /dev/null +++ b/functions/SLS_FL.m @@ -0,0 +1,5 @@ +function [names, weg, kraft] = SLS_FL(voltage) + names = ["Weg_FL", "Kraft_FL"]; + kraft = (voltage/1000 - (2.073 - 200 * (-0.104/1800)))/(-0.104/1800); + weg = (voltage/1000 - (1.969 - 0.38 * (-0.111/0.38)))/(-0.111/0.38); +end \ No newline at end of file diff --git a/functions/example.m b/functions/example.m new file mode 100644 index 0000000..0d6c4c1 --- /dev/null +++ b/functions/example.m @@ -0,0 +1,16 @@ +function [NameOfOutput, Output1, Output2] = example(data) + % explanation + % data is double with the length of the timetable + % you can add any number of datasets to your function be clicking them in the "Choose Data Sets to use" Field + % Datasets will be input in the same order as you clicked them + % you can add more inputs into your function by typing something like this [NameOfOutput, Output, NameOfOutput2, Output2] = example(data, data2, data3), same with outputs + % keep the sequence of name, output, name output, otherwise there will be errors + % if exported to workspace the output can be viewed in data_created with the column title NameOfOutput + % NameOfOutput will be displayed in the app, as well as in in data_created exports + % reminder that the inputs and outputs after function [outputs] = functionname(inputs) must be declared somewhere in the function + % if you want to test your function you can export the data and use the function outside of the app with the terminal + + NameOfOutput = ["Output 1" "RandomName"]; % don't use , + Output1 = data * 2; %output should be a double with same length as your data + Output2 = data * 1/2; +end \ No newline at end of file diff --git a/functions/test.m b/functions/test.m new file mode 100644 index 0000000..a126dcc --- /dev/null +++ b/functions/test.m @@ -0,0 +1,5 @@ +function [names, data, data2] = test(abc, def) + names = ["Data1" "Data2"]; + data = abc*2; + data2 = def*3; +end \ No newline at end of file