Dynamically Sized S-function Builder Inputs
6 次查看(过去 30 天)
显示 更早的评论
Coming into my S-Function Builder block, I have a one-dimensional signal that could be anywhere from 1 to 17 uint8's in length. Within the S-Function Builder block, my input has the following specifications:
Dimensions: 1-D
Rows: -1
Data type: uint8
However, I get the following error message:
Error due to multiple causes.
- Error in port widths or dimensions. Invalid dimension has been specified for input port 1 of 'LCDcount/S-Function Builder'.
- Error in port widths or dimensions. Output port 1 of 'LCDcount/Format Time' is a one dimensional vector with 9 elements.
I expect the signal to be 9 elements (I attached a constant block directly to the S-Function Builder input as a test case to replace my original configuration, which was a MATLAB function - no difference between the errors). Simulink writes a 9 next to the previous block's output, but places a (?) symbol at the input to the S-Function Builder block.
I have no idea how to go about debugging this one, so any help would be appreciated! Thanks!
0 个评论
采纳的回答
Sandip Kumar
2014-10-27
Yes the documentation is correct, in specifying that the dimension of the input can be dynamically sized. I quickly played with an example, and attaching it here.
Make sure to build the s-function builder block to get the mexw64 files for the block to simulate.
This should give you some ideas to fix the issue you are facing.
Thanks, Sandip
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!