All necessary parameters have to be transferred to the basic workspace in order to allow the app to access to these parameters. When the app is closed, the parameters will be deleted from the basic workspace.
function RunSim(A,B)
% Parameter
TestCase = 'TBD';
Date = 'TBD';
% Transfer necessary parameter to base workspace
assignin("base","TestCase",TestCase);
assignin("base","Date",Date);
% Call App
App_Example = App_Name(TestCase,Date)
waitfor(App_Example)
% Transfer Results to function (caller) workspace
TestCase = evalin("base","TestCase");
METADATA = evalin("base","METADATA"); % Parameter generated in App and is needed withing the function
% Clear all parameter from base workspace
evalin("base","clear TestCase METADATA");
end