If you are passing in Weights, at least one weight must be positive.
Otherwise: you need at least one row of X to contain finite values. You probably have missing data in X (or possibly X is empty)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!