Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
dotConnect for Dynamics CRM 1.7
Entity Developer 6.3
ODBC Driver for BigCommerce 1.4
dbForge Documenter for Oracle 1.0
dbForge Data Generator for Oracle 2.0
Odoo MobiCraft Theme 1.0
AnyChart JS Charts and Dashboards 8.4.0
IP2Location Geolocation Database October.2018
AnyGantt JS Gantt Charts 8.4.0
dbForge Data Compare for PostgreSQL 3.1
Paste phpSoftPro 1.4.1
Bytescout PDF SDK 1.8.1.243
Odoo Crafito Theme 1.0
Uber Clone- Taxi Booking App 4.1
Excel Add-in for BigCommerce 1.7
Top Code
Travel Booking script 1.0.4
Online Vacation Rental Booking Website Script 4.3.0
PHP Point of sale 10.0
JadaSite e-commerce solution 2.03
Traveling Salesman Problem (TSP) using Simulated Annealing 1.0
Online Food Ordeing System 1.0
TIC TAC TOE AI GAME Script 1.1
image compression using wavelet transform 1.0
Hysteresis Thresholding 1.0
Ping Pong Game Code Script 1.1
Ticket Booking System 1.0
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Jlguiapplet (mp3&ogg Player) 2.1.2002
Image compression demo usins KL transform 1.0
SuperGeek Free Document OCR 2.5.6
Top Rated
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
Advanced MLM Software 1.2
Online Food Ordeing System 1.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
PHP Point of sale 10.0
Travel Portal Script 9.29
Excel Add-in for Bigcommerce 1.6
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Shortest Distance Between Two Lines in N dimensions 1.0
File ID: 86551






Shortest Distance Between Two Lines in N dimensions 1.0
Download Shortest Distance Between Two Lines in N dimensions 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 15
Submit Rating:
Shortest Distance Between Two Lines in N dimensions 1.0 Description
Description: Function uses algorithm from Dan Sunday internet site
http://softsurfer.com/Archive/algorithm_01...ment_to_Segment
L1, L2 includes two points in matrix of 2*n
where n are dimensions (3 in 3D).
d - shortest distance between two lines
Pc,Qc - points where exists shortest distance d

EXAMPLE:
L1=rand(2,3);
L2=rand(2,3);
[d Pc Qc]=distBW2lines(L1,L2)

Functions of lines L1,L2 and shortest distance line
can be plotted in 3d or with minor change in 2D by
removing comments sign from code at the end of the file.
In some cases points Pc,Qc will not displayed accurately on line.
Just change value of par parameter according to point.

Programmed by Alexander Brodsky
newshurik at yahoo.com

License: Shareware

Related: filein, cases, displayed, Comments, byremoving, plotted, minor, Change, accurately, linejust, Alexander, brodskynewshurik, yahoocom, pointprogrammed, Parameter, linecan, Lines, points

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 15



More Similar Code

Computes the shortest distance between two line segments given start and end points for each. Adapts the algorithm found on Dan Sunday's website (http://softsurfer.com/Archive/algorithm_01...ment_to_Segment
).

Usage: Input the start and end x,y,z coordinates for two line segments.
p1, p2 are [x,y,z] coordinates of first line segment and p3,p4 are for
second line segment.

Output: scalar minimum distance...



This function will compute the great circle distance between two points on a sphere of uniform radius using the Vincenty formula. At minimum, four inputs are required: lat1, long1, lat2, long2. Optionally, a fifth parameter (r) can be specified....



This program calculates the distance between two locations (latitude and longitude) using the Haversine formula. The Haversine formula gives the shortest distance between two points over the earth's surface, ignoring elevation, hills, etc...



This function computes the minimum euclidean distance between two polygons P1 & P2.

- for vertex-vertex case



Takes the list of coordinates between 2 groups of pixels and calculates the shortest distance between the 2 groups and returns their pixel coordinates.



Geozip Calc Distance Between Zip Codes is Unix compatible. Calculates distance between zip codes in the US or finds zip codes within a given distance. The sub-routines included can be used to calculate distance between latitude and longitude...



M-file to calculate the distance between two points on the earth surface, using different ellipsoid parameters.



These files show how MATLAB can be used to simulate random walks both on a lattice in N-dimensions and on a graph. The zip file contains the following:

RandDir: generates a random basis vector on a lattice
RandGraphMove: Given a...



Vincenty published an algorithm for calculating the distance between two latitudes and longitudes and another to find the destination latitude and longitude, given the start coordinate, bearing and distance



This script calculates distance between two US zip codes. Included sub-routines can be used to calculate any distance between latitude and longitude coordinates. The calculation accounts for the fact that the earth is not a perfect sphere.

User Review for Shortest Distance Between Two Lines in N dimensions
- required fields
     

Please enter text on the image