View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 3 ratings Rate this file 9 Downloads (last 30 days) File Size: 23.7 KB File ID: #21261 Version: 1.0



Nassim Khaled (view profile)


29 Aug 2008 (Updated )

This file contains a guide_simulink_sfunction interface. It is a fairly easy and simple application.

| Watch this File

File Information

This file contains a guide_simulink_sfunction interface. It is a fairly easy and simple application. It was mainly created as a reply for a question from one of the students on “how to display the simulink results in real time in a gui interface, outside the boundries of simulink?” the gui(simulink_gui_interface) is a simple one. It calls the simulink model(simulink_model.mdl), which in return uses an s-function(sfun.m) to plot the data. I tried to make this example as simple as possible so that more people would benefit from this application. One more important observation, if you run the simulink model (simulink_model.mdl) from simulink, it will take more time than running the simulink model from the interface itself (simulink_gui_interface)!!
To run, just type in the Matlab workspace:

Submitted by
Nassim Khaled
PhD Candidate
Wayne State University


This file inspired Real Time Update Of Simulink Variables In Gui.

Required Products Simulink
MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
22 Jun 2014 Amir

Amir (view profile)

My GUI has 3 axes, in the first there is a picture, and the second and third should show the 2 scope results. How can I modify your code to view those 2 scopes in axes2 and axes3, cause this shows me only one scope in the axe1 where the picture is??? please help

08 Apr 2013 Kristijan

Hi, can you tell me how to get a Simulink Scope data after the simulation stops. I need to process Scope data in GUI.


Comment only
18 Jun 2012 zhou jianshan  
01 Sep 2008 Qadeer Ahmed

A very good tutorial for beginners.

Contact us