Simulink Mux parameters
9 次查看(过去 30 天)
显示 更早的评论
Hi,
I trying to use the value of Mux block output(2 in --> 1 out) in a .m file(my program). I´ve try 'get_param' with parameter 'Value' without success. What the right parameter to read the value in my program. I´m expecting that the value is a vector with 2 elements.Right ?
Thanks Eric
2 个评论
Fangjun Jiang
2011-8-30
What do you mean by "use the value of Mux block output"? Mux block is for signal routing for the most part. Are you trying to get the value of the signal at the outport of the Mux block from your M-script while the simulation is running?
采纳的回答
Fangjun Jiang
2011-9-1
It is not particularly related to the Mux block. You are looking for a way to get the dynamic signal data from a Simulink block while the simulation is running. See this post http://www.mathworks.com/matlabcentral/answers/14061-get-value-from-simulink-model-to-matlab-gui-while-simulink-is-running for the method. There are several steps involved. See link from TMW.
I would recommend that you not to get the signal data from the Mux block. Instead, you should try to get the signal data from its source, such as a Gain block, or a Sum block where the signal is created. Mux block in many cases is used for signal routing.
6 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!