필터 지우기
필터 지우기

Error message when using findpeaks and csvread

조회 수: 1 (최근 30일)
YHJ
YHJ 2017년 7월 27일
답변: Cong Ba 2017년 8월 1일
Hi,
I am using findpeaks to detect peaks on ECG data (attached). I get the following error message:
Error using findpeaks>parse_inputs (line 325)
Error: File: strncmpi.m Line: 1 Column: 1
The input character is not valid in MATLAB statements or expressions.
Error in findpeaks (line 132)
= parse_inputs(Yin,varargin{:});
Also, when loading the csv file using csvread I get the following error:
usage: unique (x) or unique (x, 'rows')Undefined function or variable 'toascii'.
Error in dlmread (line 143)
throw(exception);
Error in csvread (line 47)
m=dlmread(filename, ',', r, c);
I could open the csv file and find peaks successfully maybe 2 weeks ago but now it fails with the same code.
Many thanks,
SJ
  댓글 수: 1
KSSV
KSSV 2017년 7월 28일
What code you have tried? Show us here.....also what does which findpeaks shows on the screen?

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

답변 (1개)

Cong Ba
Cong Ba 2017년 8월 1일
Try this (remember to put the csv file in the working folder):
data = csvread('baselinesmooth.csv');
[pks,locs] = findpeaks(data);
plot(data); hold on;
plot(locs, pks, 'o');
If this doesn't work correctly, could you tell us the version of MATLAB you're using?

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by