How to sample and process signals of a given length in Simulink
2 次查看(过去 30 天)
显示 更早的评论
I have to calculate the correlation of a signal x in Simulink:
Exx = 0;
for t=1:size(x,1)
Exx = Exx + x(:,t)*x(:,t)';
end
Exx = Exx/size(x,1)
where x(:,t) corresponds n signal values measured at time t.
If this is to be done in Simulink, do I have to use the embedded Matlab function, or is there a more elegant way?
Thanks :)
Benjamin
0 个评论
采纳的回答
Paulo Silva
2011-3-2
To sample the signals use Weighted Sample Time block from simulink, there might be more options inside the signal processing library.
更多回答(1 个)
Kaustubha Govind
2011-3-2
Use the Autocorrelation block, or follow the diagram description in the block documentation to implement your own.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Signal Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!