How to define Repeating Sequence Stairs block in Simulink?

8 次查看(过去 30 天)
Hi,
I was using the repating sequence stairs block a while ago and I had no problem. But after I change my software version I am not able to use the repeating sequence. I do not remember how did I solve before. I just want to create position points in Simulink then I will create a trajectory between stairs.
I got the following error when using the block:
Invalid setting in Repeating Sequence Stair/LimitedCounter/Data Type Propagation' for parameter '(sort(reshape(round(NumBitsAllowFinal), prod(size(NumBitsAllowFinal)),1)))'.
Caused by:
Error evaluating parameter '(sort(reshape(round(NumBitsAllowFinal), prod(size(NumBitsAllowFinal)),1)))' in Repeating Sequence Stair/LimitedCounter/Data Type Propagation'
index exceeds matrix dimensions.

回答(1 个)

Austin
Austin 2023-2-10
So, I just ran into this same issue today and was able to resolve it just by clearing out my workspace, closing, then reopening the file.
In my specific case, I had defined a variable named size and had given it as an array. This caused Simulink to become confused because that Repeating Sequence Stair block uses a function named size.
For whatever reason, this Simulink block was pulling from the base workspace my own variable and trying to interpret it has a function. This was extremely frustrating. I can't think of any other platform that would not have their own internal variables/functions scoped outside of the global base workspace. Why anyone would design a software platform like this is beyond my comprehension.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by