Fix the beta methods. Update code to use length instead of numel.
Merge pull request #9 from andreasnoackjensen/fixbeta

Fix the beta methods. Update code to use length instead of numel.