Undefined function 'resample' for input arguments of type 'double'.
12 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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 个评论
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 Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!