Error using Merge Block
7 次查看(过去 30 天)
显示 更早的评论
Assalamualaikmum & Hi all
I have a problem that is matlab error report like this "output port 1 is required to be persistent, hence this signal cannot be connected to a Merge block."
anyone can help me
2 个评论
采纳的回答
更多回答(1 个)
Fangjun Jiang
2011-9-21
I don 't have that Toolbox so can't comment the specific. But simply said, you can not connect the output of that block to the Merge block. Double click the Merge block and click the "help" button, there is explanation about the Merge block. There are other situations that the output of certain blocks can not be connected to the Merge block.
2 个评论
Fangjun Jiang
2011-9-22
I know "persistent" from MATLAB M-programming point of view but never heard it is required by Simulink. Inside an M-function, you could define a variable temp, which is not an input argument nor an output argument. When the function is completed, the variable temp is going to be cleared. But if temp is declared as "persistent", it is not going to be cleared. Instead, it is saved, and the next time the same function is called, the variable temp can be used starting from its previous value.
Type help persistent or doc persistent for more information.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!