フィルターのクリア

Connecting the threshold points of a curve using straight lines

3 ビュー (過去 30 日間)
zafar khan
zafar khan 2017 年 5 月 2 日
コメント済み: Image Analyst 2017 年 5 月 2 日
I want to connect the threshold point of energy using matlab programatically. I am unable to understand what is the best way to do it. Keeping in mind that at the end i will require only straight lines so need the data point for the lines fitting the curve. Any idea how can this be done?
  2 件のコメント
Rik
Rik 2017 年 5 月 2 日
Are the straight lines known, or should they be generate from the curve?
If the first is the case, it is just a matter of finding the intersection coordinates of two straight lines, which should take you 5 minutes to Google.
If the latter is the case, I think I would try an iterative approach: use polyfit for more and more points, until a threshold is reached for a GOF-parameter, then start selecting points for the next line segment.
zafar khan
zafar khan 2017 年 5 月 2 日
Well the orginal idea is to draw tangents ideally passing through or preferbly interstcting at the top or bottom point of curve tgreshold. As i require to do it without looking at it and at the end need the y values which will b values of tangent at time as x is time.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2017 年 5 月 2 日
Assuming you don't know exactly where the tangent lines should fall, I think this is a case of finding the "minimum perimeter polygon". See http://dip.sun.ac.za/~hanno/tw444/lesings/lesing_19.pdf for a lesson on it.
  3 件のコメント
zafar khan
zafar khan 2017 年 5 月 2 日
As per my understandin mpp is used to reduce the number of data points,but in my case each curve has 48 data points and i want to draw tangents just to linearize the shape. However, after drawing such tangents ( trying to draw tangents to best represet the original data) i will need that values of y or tangent values which are again 48 i.e half hourly reading of energy.
Image Analyst
Image Analyst 2017 年 5 月 2 日
Knowing the data points, and the fact that there are lines in between them, you can use linspace() or interp1() to get a bunch of points in between.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeBiotech and Pharmaceutical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by