Connecting the threshold points of a curve using straight lines

2 views (last 30 days)
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?
zafar khan
zafar khan on 2 May 2017
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.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 2 May 2017
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 for a lesson on it.
Image Analyst
Image Analyst on 2 May 2017
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.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!