Help me in finding mistake

4 ビュー (過去 30 日間)
Explorer
Explorer 2016 年 1 月 30 日
コメント済み: Explorer 2016 年 1 月 31 日
I have made a function (having name preprocessing) and calling it by following command in Command Window.
preprocessing('C:\Users\Explorer\Documents\MATLAB\PhysioNet_Database\Malignant_Ventricular_Ectopy_Database\418m.mat')
But getting Error and here it is:
Error using upfirdn>validateinput (line 102)
The input signal X must be a double-precision vector.
Error in upfirdn (line 82)
[p,q] = validateinput(x,h,varargin);
Error in resample (line 119)
y = upfirdn(x,h,p,q);
Error in preprocessing (line 21)
r_nsr16265=resample(nsr16265,256,fs); % Resampling
By the way, if it asks for default sampling frequency, enter 250.
  1 件のコメント
Walter Roberson
Walter Roberson 2016 年 1 月 31 日
Well that's a broken website. :(
I have downloaded and attached the file so that no-one else needs to go through that... experience .

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 1 月 31 日
編集済み: Walter Roberson 2016 年 1 月 31 日
That routine does not accept file names.
filestruct = load('C:\Users\Explorer\Documents\MATLAB\PhysioNet_Database\Malignant_Ventricular_Ectopy_Database\418m.mat');
preprocessing(filestruct.x)
  10 件のコメント
Explorer
Explorer 2016 年 1 月 31 日
Sorry. Won't do it again.
Explorer
Explorer 2016 年 1 月 31 日
I got the answer in your last comment here i.e You need to load the .mat file and access the appropriate variable from the file
I just replaced line # 18 of function by this
nsr16265=x.val(1,:);
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by