How can I use decreasing x-data using findpeaks?

조회 수: 4 (최근 30일)
Jort Puiman
Jort Puiman 2021년 3월 3일
댓글: Yasuyuki Hamanaka 2021년 6월 19일
Hello everyone,
I want to analyse my Cyclic Voltammetry data on its peaks, which has increasing and decreasing X values and their own corresponding Y values. For this, I just installed the necessary toolbox, but when I try to run the following code:
[pks, LOCS] = findpeaks(GlucoseS3{:,4}, GlucoseS3{:,1});
I get the following error:
Error using findpeaks
Expected X to be strictly increasing.
I reckon that the code recognises GlucoseS3{:,1} to be X, and have increasing as well as decreasing values.
How can I change this code to accept decreasing X values, as I have to analyse a lot of datasets with each 700 points.

답변 (1개)

KSSV
KSSV 2021년 3월 3일
May be you should try:
[pks, LOCS] = findpeaks(GlucoseS3{:,1}, GlucoseS3{:,4});
  댓글 수: 2
Jort Puiman
Jort Puiman 2021년 3월 3일
Unfortunately it doesn't work, but I've found another way by using gradient and find(x<0.001). Still, thanks for your answer!
Yasuyuki Hamanaka
Yasuyuki Hamanaka 2021년 6월 19일
Would you tell me how to solve the problem?

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

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by