Hello, I want to use sgoalyfilt(x,order,framelen) but gets the error "Input arguments must be 'double'" and I cant´t understand why it dosn't work?
I use it like this:
order=4;
framelen=556497; % dosen't matter if I use 51 or 5 either, it gives the same error
P1_filt = sgolayfilt(P1,order,framelen) % where P1 is my measures values in a vector 1112992X1
Grateful for some help!

 채택된 답변

Mathieu NOE
Mathieu NOE 2021년 2월 26일

0 개 추천

hello Anna
are you sure P1 is type double ?
the code works on my side with dummy rand input
P1 = randn(1112992,1);
order=4;
framelen=5111;
P1_filt = sgolayfilt(P1,order,framelen); % where P1 is my measures values in a vector 1112992X1

댓글 수: 4

Anna Arnesson
Anna Arnesson 2021년 2월 26일
It is a vector with number as the picture showes:
Mathieu NOE
Mathieu NOE 2021년 2월 26일
the picture says it's a single, you have to convert to double
Anna Arnesson
Anna Arnesson 2021년 2월 26일
oh, miss that point! Now I used double(P1) and it works. Tanks for the help!
Mathieu NOE
Mathieu NOE 2021년 2월 26일
you're welcome !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Traveling Salesman (TSP)에 대해 자세히 알아보기

질문:

2021년 2월 26일

댓글:

2021년 2월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by