How can I storage data in simulink to use it as one set of data?
3 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!