Sorry for the earlier post.
I realized that I was running an older version of MATLAB (7.1). I have now installed the latest release (2009b) and your function appears to work.
Thanks again for these helpful tools!
Thank you for these good demos, Glen! I found you via the NaturalPoint help forum.
I have downloaded both this package and TT_Tools_demo, hoping to get a developmental "leg up".
I encountered a problem right off the bat with this file. I am using V100R2:FLEX cameras. Currently I have only one camera attached (and no hub). When I attempt to run this function, I receive the following output:
Number of cameras = 2
??? Error using ==> registerevent
Input must be a scalar handle.
Error in ==> optitrack_data at 31
The function reports 2 cameras because I have a Hardware Key (for the TT software license) installed; when I remove the key, the camera count drops to 1 but the error is the same. Any thoughts, or is this simply a problem with V100R2:FLEX cameras (as opposed to the TrackIR4 for which you developed this code)?
Mear - could you be more specific regarding your doubts about the wwtest?
The negative values for circ_mean are a result of the way circ_mean is implemented. If you prefer them to be between 0 and 2pi, just edit the function to provide the data in that format.
I'll update the von Mises function in a future release.
Just a quick question concerning the circ_mean function: I usually get the results in negative values, despite all the input angles being in positive degrees (conv. to rads). It's hardly a big deal to translate this to [0,360] degrees, but it is a bit annoying and seems unneccesary. Is this how it should be? I'm also getting some results for the wwtest which seem very wrong to me (but make sense in light of the negative mean values), and it's making me question the accuracy of this toolbox.
Marc, thanks, you are right.
I generated a von mises distribution with the mu and kappa estimated from my angles, say x, i.e.:
[mu kappa] = circ_vmpar(x)
vonmis = circ_randvm(mu,kappa,length(x))
Then I use the kuiper test to see whether the two distribution x and vonmis differ significantly (the difference can be in any property, such as mean, location and dispersion):
[H,pValue] = circ_kuipertest(x, vonmis)
However I was wondering if it is possible to have more accurate p-value estimates in the Kuiper test, as already asked by another user before.