plotting percentage of a max value

조회 수: 2 (최근 30일)
Aero32
Aero32 2020년 12월 2일
편집: KSSV 2020년 12월 2일
Hello,
I have 15 different graphs. For each one I have found the max value. I want to plot a dot on the curve at 5% of the max value. Could someone help please?
  댓글 수: 2
Ameer Hamza
Ameer Hamza 2020년 12월 2일
What do you mean by "5% of the max value". The circle in your image is right at peak.
Aero32
Aero32 2020년 12월 2일
I would like to plot 5% of the peak value

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

답변 (1개)

KSSV
KSSV 2020년 12월 2일
편집: KSSV 2020년 12월 2일
You may get multiple values for this case.
[val,idx] = max(y) ;
y1 = val*5/100 ;
% Increase the reoslution of (x,y) data
xi = linspace(min(x),max(x),1000) ; % change the number of needed
yi = interp1(x,y,xi) ;
% Get the index of y1
idx = abs(yi-y1)<=10^-3 ; % change the tolerance if needed
iwant = [xi(idx) yi(idx)] ;

카테고리

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