hamming(L) function showing error
조회 수: 4 (최근 30일)
이전 댓글 표시
I have Matlab R2018a version. The hamming window function shows error. This is what I typed:
hamming(64)
Error using *
Incorrect dimensions for matrix multiplication. Check that the number of columns in the
first matrix matches the number of rows in the second matrix.
To perform elementwise multiplication, use '.*'.
Error in SD>@(N)(0.54-0.46*cos(2*pi*[0:N-1].'/(N-1)))
I checked my current software and found I have signal processing toolbox installed in the version. I checked the same hamming(L) function in R2016b and it did not show any errors.
How to rectify this error??
댓글 수: 3
dpb
2018년 7월 3일
Ah! I thought perhaps TMW had tried to get clever in the Toolbox by making dynamic-assigned functions or the like.
But,
hamming=@(N)(0.54-0.46*cos(2*pi*[0:N-1].'/(N-1)));
works as written here; it's within double-precision roundoff of the result of the builtin function so not sure what went wrong; it isn't obvious from the info available certainly.
I'm now guessing that
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Hamming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!