이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
hello i want to downsampling a signal with 173HZ and 23.6s to 120HZ ,can i do it with matlab 2012b ?
채택된 답변
m
2013년 8월 16일
0 개 추천
yes, i have signalprocessing toolbox,but i cant use '_resample()_' can you tell me about parameters (173 hz to 120 hz)? thanks.
댓글 수: 17
Matlab help says:
y = resample(x,p,q) resamples the sequence in vector x at p/q times the original sampling rate, using a polyphase filter implementation. p and q must be positive integers. The length of y is equal to ceil(length(x)*p/q). If x is a matrix, resample works down the columns of x.
i.e. in your case p=120 and q=173, so:
x_resampled = resample( x, 120, 172 )
should do the trick.
m
2013년 8월 16일
thanks for your answer,i run it but get this error: "_Too many input arguments._" do you know this error? my x variable is eq 4096
Jan
2013년 8월 16일
Check the type of your signal. It should be either a vector or a 2-d matrix.
can i attach the file of sampled signal to this comment, that you can see it?
Jan
2013년 8월 16일
Before you start uploading files: how do you load the signal into the Matlab environment and what kind of signal is it that you are dealing with?
m
2013년 8월 16일
i want to import the eeg signal ,the file has 4097 numbers,i use import from menu then import it to a variable,and the file has one column... i think matlab has a bug with this function because when i try to run sample code of 'resample' i see this error again !
Jan
2013년 8월 16일
In the Matlab command line type whos and post the output.
Also type the variable name and post that output, too.
m
2013년 8월 16일
my input command : y=resample(inputsig,120,173); output : Error using resample Too many input arguments.
my enviroment report : Name Size Bytes Class Attributes
inputsig 4097x1 32776 double
y 1x4098 32784 double
Jan
2013년 8월 16일
Could you type
which resample
and post that output?
Please post the result of
which -all resample
m
2013년 8월 16일
ofcourse, the output is :E:\edu\ARSHAD AI\classes\EVALUATIONARY ALGORITHMS\Project\Steps\Data\resample.m
do you think the path is so long?
Jan
2013년 8월 16일
No, there is a function in your project that is called resample too which hides Matlab's resample function. Unload the path you just posted from your environment and try to call resample again.
E:\edu\ARSHAD AI\classes\EVALUATIONARY ALGORITHMS\Project\Steps\Data\resample.m C:\Program Files\MATLAB\R2012b\toolbox\matlab\timeseries\@timeseries\resample.m C:\Program Files\MATLAB\R2012b\toolbox\ident\ident\@iddata\resample.m C:\Program Files\MATLAB\R2012b\toolbox\simbio\simbio\@SimData\resample.m C:\Program Files\MATLAB\R2012b\toolbox\matlab\timeseries\@tscollection\resample.m C:\Program Files\MATLAB\R2012b\toolbox\signal\signal\resample.m
m
2013년 8월 16일
after i delete my resample function : C:\Program Files\MATLAB\R2012b\toolbox\signal\signal\resample.m
m
2013년 8월 16일
OK OK ,after delete my resample function it works well... thanks so much
Jan
2013년 8월 16일
No problem... but next time check which answer you chose as 'accepted answer' (:
m
2013년 8월 16일
yes,sorry..
추가 답변 (1개)
Jan
2013년 8월 16일
0 개 추천
If you have the Signalprocessing Toolbox use resample() or decimate()
If not, look at interp1()
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
제품
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
