Coefficient Matrix for Savitzky-Golay Data Filtering
이전 댓글 표시
Starting from a polynomial coefficient vector such as: [-3/35 12/35 17/35 12/35 -3/35] I would like to create a coefficient matrix of the form:

by iteration of this vector in order to perfrom the Savitzky-Golay signal smoothing. How is this possible without using a for ... loop?
댓글 수: 1
Why do you want to avoid a loop? Are you aware that this must be done by a loop, even if it is hidden inside a Matlab command? Why do you want to create a potentially huge matrix with such a low density of information? Note that you have 4 independent values only in your example. Do you want at least a sparse array?
The explicite creation of the matrix is such a waste of time, that a FOR loop will not matter at all. If you want to compute the matrix product also, you loose even more time, because the matrix consists almost only of zeros. Use filter instead.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!