필터 지우기
필터 지우기

Can anyone tell me why this error is occurring and how to solve it? Thank you.

조회 수: 6 (최근 30일)
Rafia Noshin
Rafia Noshin 2023년 2월 24일
댓글: William Rose 2023년 2월 27일
I am getting modwt (line138) error saying invalid transform level. I have tried using different ecg data files in mat format from physionet atm.
Code:
%program to get QRS peaks and Heart Rate from ECG signal
[filename,pathname]=uigetfile('*.*','Select the ECG Signal');
filewithpath=strcat(pathname,filename);
Fs=input('Enter Sampling Rate: ');
ecg=load(filename); %Reading ECG signal
wecg=(ecg.val)./200; %Normalize gain
t=1:length(wecg); %No. of samples
tx=t./Fs; %Getting Time vector
wtecg= modwt(wecg,4,'sym4'); %4-level undecimated DWT using sym4 //this is where the error is occurring//
wtrec=zeros(size(wtecg));
wtrec(3:4,:)= wtecg(3:4,:); %Extracting only d3 and d4 coefficients.

답변 (1개)

William Rose
William Rose 2023년 2월 24일
@Rafia Noshin, please include a sample ecg data file so we can run the code.
What error do you get? When I run that line, I get no error:
wecg=rand(1,2000);
wtecg= modwt(wecg,4,'sym4');
disp(size(wtecg))
5 2000
It runs without error for me.
  댓글 수: 7
Rafia Noshin
Rafia Noshin 2023년 2월 27일
Okay. Thank you for answering my question.

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

카테고리

Help CenterFile Exchange에서 Signal Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by