wind_rose execution

14 views (last 30 days)
Rajendra Sapkota
Rajendra Sapkota on 6 Mar 2012
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));

Accepted Answer

Matt Tearle
Matt Tearle on 6 Mar 2012
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.
  2 Comments
Rajendra Sapkota
Rajendra Sapkota on 6 Mar 2012
Thanks Matt Actually I am learner of matlab and I need to use matlab in my porject. I have 2 yers wind data about 1 million data point. I have one column of wind direction in degree(0-360). I am not sure how call the program, i tried wind_rose(D,V,'ci',[1 2 7],'dtype','meteo') where assigned D= dir column, I have no idea for V and other parameter are standard defined in program. Could you please give me idea how to handle wind_rose?
Matt Tearle
Matt Tearle on 7 Mar 2012
I don't know anything about this particular function, but it looks like V should be a vector of the intensities (wind speeds), corresponding to the wind directions in D. I'd start by trying to call it as simply as possible: wind_rose(D,V) and see if that works. Then worry about adding in the options.
You can also always try contacting the author, if you need clarification about the technical details.

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!