Undefined function 'resample' for input arguments of type 'double'.

조회 수: 13 (최근 30일)
Aishwarya Deshpande
Aishwarya Deshpande 2020년 11월 6일
댓글: Star Strider 2020년 11월 7일
I keep getting the error "Undefined function 'resample' for input arguments of type 'double'."
The code i am using is a preinstalled MATLAB code, still this error keeps popping up.
what is the solution for this. can someone help as soon as possible. my data analysis is stuck because of this error

답변 (1개)

Star Strider
Star Strider 2020년 11월 6일
편집: Star Strider 2020년 11월 7일
There are several resample functions. Be sure that you are using the Signal Processing Toolbox resample function. (It is necessary to have the Signal Processing Toolbox licensed and installed.)
EDIT — (7 Nov 2020 at 1:33)
One way to troubleshoot this is to run:
which resample -all
from your Command Window or a script.
My results for that:
C:\Program Files\MATLAB\R2020b\toolbox\signal\signal\resample.m
C:\Program Files\MATLAB\R2020b\toolbox\ident\ident\@iddata\resample.m % Shadowed iddata method
C:\Program Files\MATLAB\R2020b\toolbox\matlab\timeseries\@timeseries\resample.m % Shadowed timeseries method
C:\Program Files\MATLAB\R2020b\toolbox\matlab\timeseries\@tscollection\resample.m % Shadowed tscollection method
.
  댓글 수: 2
Aishwarya Deshpande
Aishwarya Deshpande 2020년 11월 7일
I tried this as per you said, but then
toolbox\matlab\timeseries\@tscollection\resample.m
this pops up, when i add this to path and run the code again
I get the message
"the resample function can only be used for a single timeseries object"
can you explain what that means? how i can get the code to run?
Star Strider
Star Strider 2020년 11월 7일
The resample function only takes double arguments, although they can be vectors or matrices. You would likely have to extract the timeseries object to a double vector (or matrix), or loop through the individual rows (or columns) of your timeseries object. The loop is likely the best option.
I have no idea what your data are, so I cannot determine what the problem is. I have never used resample on timeseries objects.

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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by