MATLAB: Get value from simulink model to matlab gui while simulink is running

get_paramguisimulnk

With respect to following post I have some doubts related to command get_param:
1) When I use this command it returns me empty vector. 2) Can we use this command for any block like display, demux and out or it has to be Gain block only?
Thanks Mitesh

Best Answer

I believe it can be done that way and it should apply to all types of blocks. Remember you can't just use get_param() alone, you need to set up the event listener and callback function. See Guy Rouleau's anser in this post. It points to the link from the Mathworks website.