How do I get my app to talk to my matlab startup script?

1 view (last 30 days)
Hi everybody!
I'm currently constructing my first app in app designer that will actaully be of use to me and I'm having issues.
The setup I have is a simulink model that is controlled via a main startup script in matlab. This script loads multiple variables that in turn have different values attached dependant on which is selected.
For example
Mission = 150;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if Mission == 100
ROUTE = 'north';
SOC = 95;
TEMPERATURE = 44;
WEIGHT = 12.8;
elseif Mission == 150
ROUTE = 'SOUTH';
SOC = 90;
TEMPERATURE = 44;
WEIGHT = 14.8;
Above, the 'Route' loads data from an external .dat file, the SOC, TEMP and WEIGHT come from a variety of .m files.
Currently the user simply inputs the mission number they require, click run and it runs the mission. However, prior to each mission there are 23 variables that need manually assigning using this method and it leads to mistakes.
In my app, I want the user to select which "mission" they would like to run (as well as the other variables), click the run button within the app, and the script will know which vraiables to use when executed.
Is this possible?
Thankyou

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!