MATLAB: Wind_rose execution

I try to run the porgram but it show following error, I am using Matlab 2010a, how to correct it? Attempted to access i(1); index out of bounds because numel(i)=0. Error in ==> wind_rose at 238 d=dcircles(i(1));

Best Answer

It looks like you're using a File Exchange submission called wind_rose. There's really no way to debug the problem without seeing how you're calling this function.
It looks like the line prior to the one giving the error is returning an empty array; one reason I could think of for that is that d (defined on the line before that) is NaN, but I can't see how that would occur.
Try setting a breakpoint on the line that gives the error and running the code. When it stops on that line and enters debug mode, look at the values of d and b.
Related Question