필터 지우기
필터 지우기

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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by