フィルターのクリア

MATLAB finding local maximum in certain range

5 ビュー (過去 30 日間)
JoonHee Joh
JoonHee Joh 2017 年 8 月 18 日
回答済み: Image Analyst 2017 年 8 月 18 日
This is my time domain signal
Area enclosed in black rectangle is my area of interest
I successfully identified a minimum point;
however, I'm struggling to identify the local maximum point enclosed in this area..
I'm trying to write a code that says:
1. identify the global minimum point
2. identify the local maximum point that comes before the global minimum point
I have no idea how to write #2..
Please help!

回答 (1 件)

Image Analyst
Image Analyst 2017 年 8 月 18 日
Try this:
% Find global min
[minValue, indexOfMin] = min(signal)
% Specify where the window begins
startIndex = index - windowWidth;
% Find max
[maxValue, indexOfMax] = max(signal(startIndex:indexOfMin))
% Add offset to index
indexOfMax = indexOfMax + startIndex - 1;

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!