How to call a simulink file from push button of GUI?
1 view (last 30 days)
Show older comments
Hi,
I prepared a GUI includes radio groups for different selections. Finally it has a RUN button and I expect to run a tractor_semitrailer.mdl file with pushing this button.
I defined 3 switches in simulink which are changing by radio buttons, key1, key6 and key7. Thus I need them for running the simulink model and they are the strings.
In push button function I used str2num for keys, Chenged them to num and save with new names but there is a problem "Error while evaluating DestroyedObject Callback"
% --- Executes on button press in runtag.
function runtag_Callback(hObject, eventdata, handles)
key111 = evalin('base','key1')
key11 = str2num(key111)
key666 = evalin('base','key6')
key66 = str2num(key666)
key777 = evalin('base','key7')
key77 = str2num(key777)
keymm = evalin('base','maneuver_type')
keym = str2num(keymm);
TSoutput = 92;data;main;state_space1
sim 'tractor_semitrailer'
Would you please give me some hints?
1 Comment
Arnab Sen
on 29 Dec 2015
Provide the following informations: 1. Exactly which line in the code causes the error 2. Where the code is getting the values of data, main, state_space1. 3.Complete error message preferably the error snapshot. 4. A sample code reproduces the issue.
Answers (0)
See Also
Categories
Find more on Simulink Environment Customization 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!