wind_rose execution

14 次查看(过去 30 天)
Rajendra Sapkota
Rajendra Sapkota 2012-3-6
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));

采纳的回答

Matt Tearle
Matt Tearle 2012-3-6
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 个评论
Rajendra Sapkota
Rajendra Sapkota 2012-3-6
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 2012-3-7
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by