wind_rose execution
14 次查看(过去 30 天)
显示 更早的评论
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));
0 个评论
采纳的回答
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 个评论
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!