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일

0 개 추천

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일
I am still facing same error.
Walter Roberson
Walter Roberson 2016년 1월 31일
I have corrected my code.
Explorer
Explorer 2016년 1월 31일
편집: Explorer 2016년 1월 31일
Now I am getting another error i.e Reference to non-existent field 'x'.
Please show the output of
whos('-f', 'C:\Users\Explorer\Documents\MATLAB\PhysioNet_Database\Malignant_Ventricular_Ectopy_Database\418m.mat')
Explorer
Explorer 2016년 1월 31일
I not getting any output after entering the above line you stated.
whos('-file', 'C:\Users\Explorer\Documents\MATLAB\PhysioNet_Database\Malignant_Ventricular_Ectopy_Database\418m.mat')
If that does not work, then please use
clear all
load('C:\Users\Explorer\Documents\MATLAB\PhysioNet_Database\Malignant_Ventricular_Ectopy_Database\418m.mat')
whos
and show the output
Explorer
Explorer 2016년 1월 31일
Output
Walter Roberson
Walter Roberson 2016년 1월 31일
You aren't happy with the answers you are getting from me, so I am dropping out of this discussion.
Explorer
Explorer 2016년 1월 31일
Sorry. Won't do it again.
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개)

카테고리

질문:

2016년 1월 30일

댓글:

2016년 1월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by