How to sample and process signals of a given length in Simulink
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Kaustubha Govind
am 2 Mär. 2011
0 Stimmen
Use the Autocorrelation block, or follow the diagram description in the block documentation to implement your own.
1 Kommentar
Benjamin
am 2 Mär. 2011
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!