フィルターのクリア

How can I storage data in simulink to use it as one set of data?

1 回表示 (過去 30 日間)
Ali Hadelli
Ali Hadelli 2023 年 2 月 26 日
コメント済み: Ali Hadelli 2023 年 3 月 6 日
Hey guys,
I'm very familiar with Matlab but new to simulink. Beside the simulink onramp I havent done something practical by my own yet. So I have a very general question for which i couldnt find an answer.
For my model, I load variables from workspace into constant blocks in simulink as an input. The constants are column vectors that contain for instance 300 stemps of acceleration data. I calculate a few basic mathematical operations row by row and thats works fine.
But now I want to do a FFT in simulink. And for that I have to put the whole vector into the fft-function block to do the fft. How do I do this? Because simulinks reads the row of the vectors sequentially and does a fft for each row, which makes no sense. I need a block, that saves/storages/buffers (you name it) the rows of the vector, so that I can use the whole vector for the fft in one step.
I hope I explained my problem comprehensibly.

採用された回答

Swaraj
Swaraj 2023 年 3 月 6 日
To perform an FFT on the entire vector in one step in Simulink, you can use the Buffer block to store the entire vector and then feed it into the FFT block.
Set the Output Buffer Size parameter as per the requirement.
The Buffer block always performs frame-based processing. The block redistributes the data in each column of the input to produce an output with a different frame size. Buffering a signal to a larger frame size yields an output with a slower frame rate than the input.
See below link for details.
  1 件のコメント
Ali Hadelli
Ali Hadelli 2023 年 3 月 6 日
Thank you very much! That is what i was looking for

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTransforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by