orthogonal between two (almost) parallel lines

Hi all,
My 'problem is as follows,
I have two lines, somewhere in 2-D. They should be parallel but they are not..I need the specific distance between these lines. I startedas follows: fit both lines with polyval. By taking the very upper distance and the very lower distance and deviding it by two should give reasonable indication. I dit this: Take a 1/rc (rc from polyval(1) and check intersection with other line. Take indeces are we are done...
here some weirth things pop up. My plots do not show any ortogonality or what so ever. How come? and why does intersect not work?
in short: weirt plot results and why does intersect not work with two functions created from polyval (one function is just a vector (1-d))

1 Commento

Sorry, your descriptions are a little confusing.
Show us very simple example code giving:
1. Your input
2. What you wrote to get an answer
Other than that, all we really know so far is:
A) Your lines are almost orthogonal
B) Whatever you've done tells you they're not orthogonal

Accedi per commentare.

Categorie

Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange

Richiesto:

il 21 Nov 2011

Community Treasure Hunt

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

Start Hunting!

Translated by