I have read through the forum, watched youtube videos and read the "help ...." explanations in matlab, but Im just getting more confused. I hope to find some helpful advices here.
First, I would like to run a script through appdesigner, so that the workspace is filled with the variables and I can use them, for instance with "evalin(...)" command. However, many comments suggest to use "run SCRIPTNAME" or run("SCRIPTNAME"), but it does no fill the workspace with the variables. I put this in the startupFcn(app), but it didn't show the results I need.
Is it possible? Or do you always have to run the script separately ? I also tried to do the other way around and let the script run my app designer program, but im not really satisfied with this approach.
Second, lets say the Script generates a random Matrix with M=randi([a 200], 5, 5) and I would like to adapt variable a with the slider. I am not sure how to do that, my current approach is in the button callback function:
function StartButtonPushed(app, event)
Matrix = evalin("base", "M");
Aslider = app.Slider.Value;
assignin("base", "a", "Aslider");
app.UITable.Data = Matrix;
This is what I got out of the many answers I read, but the slider doesn't work. I'm sure the slider needs to be programmed differently, but the examples from matlab dont show the connection with the variables from the script. Thanks in advance!