Plotting simulation results within GUI

1 view (last 30 days)
Matthias Klmn
Matthias Klmn on 30 Nov 2015
Hey there. I am faced with a problem and hope to get some advice on how to solve it in here. I am building a GUI with guide. Within this GUI I am running a SIMULINK simulation. I would like to automatically plot the simulation results afterwards. I do have all the scripts I need in order to do this manually without a GUI. Using the manual way everything runs fine. But when I try to achieve the same results within my GUI I do not get the variables (which should be saved within a struct) into the workspace of the callback routine from which I am running the simulation (I am using the sim-command to run the simulation). I tried to enable logging in the scope block, I used "to workspace" blocks and Outports but neither of the things I tried seem to work. When I am trying to write the results into a variable using results = sim('modelname') an empty variable is returned. So it seems to me that Simulink is writing to another workspace. Using the debugger, I was not able to find the results I was hoping to get in either of the gui workspaces.
Has anybody an idea on what my problem could be?
Thanks in advance

Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!