MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Minimum distances of one vector to another 

Subject: Minimum distances of one vector to another From: Robert Kirdeikis Date: 26 Jan, 2009 16:49:02 Message: 1 of 9 
Hi, i have a program that collapses a sphere onto a body, the program works well but my next step is finding the furthest point away from the body to determine the error. the method i got in there is 
Subject: Minimum distances of one vector to another From: Walter Roberson Date: 26 Jan, 2009 17:29:55 Message: 2 of 9 
Robert Kirdeikis wrote: 
Subject: Minimum distances of one vector to another From: Robert Kirdeikis Date: 26 Jan, 2009 17:48:02 Message: 3 of 9 
Ive fixed the square root to perform the rooting outside the loop and it has saved a bit of time. Thank you for the suggestion. I am still looking for a built in matlab function or a matrix way to get rid of the for loop which is the main time consumer to find all the minimum distances in 3d of each point on my sdata vector to a point or surface made from my data vector 
Subject: Minimum distances of one vector to another From: nor ki Date: 26 Jan, 2009 17:50:19 Message: 4 of 9 
"Robert Kirdeikis" <kirdeiki@ualberta.ca> wrote in message <glkphu$6v$1@fred.mathworks.com>... 
Subject: Minimum distances of one vector to another From: nor ki Date: 26 Jan, 2009 17:55:03 Message: 5 of 9 
"Robert Kirdeikis" <kirdeiki@ualberta.ca> wrote in message <glkphu$6v$1@fred.mathworks.com>... 
Subject: Minimum distances of one vector to another From: Robert Kirdeikis Date: 26 Jan, 2009 18:28:03 Message: 6 of 9 
Thank you hth kinor, the time required to run the loop went down from tElapsed=6.186647 seconds to tElapsed=5.004199 seconds on a smaller iteration loop i used to test it. If anybody has any more ideas on how to shave off some computation time, id appreciate hearing your ideas 
Subject: Minimum distances of one vector to another From: ImageAnalyst Date: 26 Jan, 2009 19:28:05 Message: 7 of 9 
Robert: 
Subject: Minimum distances of one vector to another From: us Date: 26 Jan, 2009 19:39:01 Message: 8 of 9 
ImageAnalyst 
Subject: Minimum distances of one vector to another From: Roger Stafford Date: 26 Jan, 2009 19:39:02 Message: 9 of 9 
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <1fa8fad2d4a84ae2a74dd4c4cb1e827d@r36g2000prf.googlegroups.com>... 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.