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

2 ビュー (過去 30 日間)
Raptrick
Raptrick 2019 年 9 月 6 日
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 Center および File ExchangeCreate System Objects についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by