Rank: 390887 based on 0 downloads (last 30 days) and 0 file submitted
photo

Gordon

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Gordon View all
Updated File Comments Rating
26 Apr 2011 M-file dependency consolidator Will take a given m-file, or directory of such files, and consolidate any dependent m/mex files Author: Jit

There's a bug in the code (alluded to by Jedediah above). You need to check line 37.

"IS_recursvie = false;"

should be

"IS_recursive = false;"

Once I fixed that, this worked great on the file I threw at it. I actually like turning recursive on: if I'm copying all the dependencies to a directory, I probably want the source file in there too.

Sorry for the double post.

26 Apr 2011 M-file dependency consolidator Will take a given m-file, or directory of such files, and consolidate any dependent m/mex files Author: Jit

Oh yeah, I use 2010a

12 Oct 2010 Distance between a point and a triangle in 3D pointTriangleDistance calculates the distance between a point and a triangle in 3D. Author: Gwendolyn Fischer

Very nice, and faster than my implementation. However, there's an error somewhere in there. Try plugging the following triangle and point in:

tri=[-0.351987256452018,-2.20321765626083,2.02537449847930;-1.63376366769586,1.51438594345573,0.862041724660671;-0.688413485634898,-1.58953522933881,-1.14541245917166];
p=[1.38048000996529,3.61393939643154,3.46074586955261];

[tridist,tripoint]=pointTriangleDistance(tri,p);
tridist
norm(p-tripoint)

output:
tridist =
6.1630
ans =
4.4997

But tridist should be the same as the norm from the initial point to the closest point (output from the function as PP0). Plotting it, it looks like PP0 is getting to the right spot, so there must be an issue with that particular path through the code. Notice that if you truncate the values I gave above, the correct answer is reached (i.e. if you only use 4 places past the decimal).

Using R2010a

Contact us