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);
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]);
05 Feb 2014
Creates a legend with a specified number of columns
I tried to plot the exact code as you wrote it but get the error: Undefined function 'columnlegend' for input arguments of type 'cell'.
Error in test (line 9)
columnlegend(3, legend_str, 'Location', 'NorthWest', 'boxon');
Does anyone have a suggestion what it might be?
This is a great tool for relatively simple needs, but I found immediately that I can't do much additional legend customization. Just doing
set(lh,'fontsize',8) caused my legend to revert to a single column. Could you include more input options or perhaps make the legend in a way that changing other properties won't affect the layout?