How do I get the turning point of a graph from discrete data points?

15 ビュー (過去 30 日間)
Tara Milne
Tara Milne 2015 年 11 月 5 日
回答済み: Usha Duddu 2015 年 11 月 9 日
I need to get the turning point of a C to V graph which was plotted on matlab with discrete data points (so I have a column vectors C and V and plotted C V)how would I do this?

回答 (1 件)

Usha Duddu
Usha Duddu 2015 年 11 月 9 日
Hi Tara
I understand that you would like to find turning point of the curve formed using discrete data points in MATLAB. I am assuming by turning point you mean maxima of the plot. In order to achieve this, you could use "findpeaks" function of Signal Processing Toolbox.
Another idea would be to set a tolerance level, find an approximate derivative of vectors using "diff" command and find turning points whose derivative is less than set tolerance level and remove the duplicate values if any. Below is the sample code snippet
>>tol=1e-3;
>>dy=diff(x);
>>x_peaks=find(abs(dy<tol));
>>unique(x_peaks);

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by