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

Richard Edmonds

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Richard View all
Updated File Comments Rating
09 Feb 2014 Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data. Author: Philipp Berens

Actually, ignore the inverse_cdf function I have provided. It should generate a vlaue for kappa and it needs adjusting for values of thetahat other than zero.

07 Feb 2014 Circular Statistics Toolbox (Directional Statistics) Compute descriptive and inferential statistics for circular or directional data. Author: Philipp Berens

Great submission. It would be nice to have cdf and inversion cdf for the vmpdf functions. Here's what I wrote for my needs
function p = circ_vmcdf(alpha, thetahat, kappa)
%integrates the pdf from an angle of -pi to an angle alpha
F = @(x)circ_vmpdf(x, thetahat, kappa);
p = quad(F,-pi(),alpha);
end

function theta = circ_vminv(p, thetahat, kappa)
%computes the inverse of the abovecirc_vmcdf.
fun =@(alpha)(circ_vmcdf(alpha, thetahat, kappa)-p);
theta = fzero(fun,[-pi pi]);
end

01 Sep 2010 Line clipping Line clipping by Cyrus Beck algorithm Author: Chandan

Good stuff, all working. It's also been a nice basis for the development of a 3D cyrus-beck lineclipping function.

Thanks.

17 Feb 2010 Line clipping Line clipping by Cyrus Beck algorithm Author: Chandan

Needs fixing, see comment.

15 Feb 2010 Line clipping Line clipping by Cyrus Beck algorithm Author: Chandan

There appears to be a mistake in this code, sorry. Its quite clear if the following data is entered at the prompt:
[0 0.1 1 1.9]
[0.2 0.2 0.8 0.8]
I suggest its related to the max/min lines. I suggest that you evaluate which t are valid for entering the view port and then eveluate which is the max entering t and min entering t from each set of valid t for each. Also parallel lines should be checked too or risk div0.

Contact us