How to set the number of samples per frame in a self-authored system object?

2 次查看(过去 30 天)
Dear all,
I'm trying to make a proprietary signal generator (no inputs, one output) in simulink using a matlab.system block from which the output is processed in frames by consecutive blocks. In order to set the sample time of the signal generator I make use of the subclass matlab.system.mixin.SampleTime. But I dont know how to set the number of samples per frame in this self-authored system object in order to enable frame-based signal processing?
A workaround is to add an input to the self-authored system object which is connected to a signal source from the DSP system toolbox (eg colorednoise). In this block you can define the sampletime and the number of samples per frame (enabling framebased signal processing). By making use of the subclass matlab.system.mixin.Propagates the sample time and the number of samples per frame can be inherited from the input. It works but it is not that elegant...
Patrick

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Create System Objects 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by