Question about S function
2 次查看(过去 30 天)
显示 更早的评论
Hi,
Is it possible to realize the following with Level 2 S function?
The input is a binary data, that is, every time only one bit can be read. The output shall save up to 10 bit and give them out. In this case the sample times at the input and at the output are different.
The problem is, in S function "block.InputPort(1).Data" is only valid for the current sample time.
Thanks Senmeis
0 个评论
采纳的回答
更多回答(1 个)
Owen
2012-10-11
3 个评论
Kaustubha Govind
2012-10-16
Owen: You cannot change the size of DWork vectors at runtime. It is best to initialize it to a vector of 10 zeros and gradually fill it in.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!