Borrar filtros
Borrar filtros

How to bring a output value from simulink model into matlab GUI

3 visualizaciones (últimos 30 días)
vidhya
vidhya el 1 de Jun. de 2017
Editada: MBD4FUN el 1 de Jun. de 2017
I can feed a value from GUI to Simulink model(two inputs to a product block and a output(Display block form SIM lib)) and it works. But how to get the output value from SIM to GUI? To feed two inputs from GUI to Simulink model i have used the following code which is working fine
******* function edit1_Callback(hObject, eventdata, handles) ******* NewVal = str2double(get(hObject,'String')); ******* set_param('untitled1/Constant','Value',num2str(NewVal));*********
and to get the output from SIM to GUI i have used the following code which is not working
******* b = str2num(get_param('untitled1/Display','value'));********* set(handles.edit4,'string',b);*********
This simple thing is really frustrating. Help me out i don't want to die with this

Respuestas (1)

MBD4FUN
MBD4FUN el 1 de Jun. de 2017
Editada: MBD4FUN el 1 de Jun. de 2017
Take a look at the following link https://stackoverflow.com/questions/24727636/read-value-of-display-block-in-simulink-using-get-param
Happy scripting!

Categorías

Más información sobre App Building en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by