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

2 vues (au cours des 30 derniers jours)
Raptrick
Raptrick le 6 Sep 2019
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

Réponses (0)

Catégories

En savoir plus sur Create System Objects dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by