Title('Cumulative Weibull probability density function') Plot(uniqueVals,cumFreq,'.',uniqueVals,cumDensityFunc, 'r') Title('Weibull probability density function') Pp=plot(uniqueVals,prob,'.',uniqueVals,densityFunc, 'r') % Plot and compare the obtained Weibull distribution with the frequency plot % Define the Weibull probability density function % Define the cumulative Weibull probability density function Title('Linearized curve and fitted line comparison') % Compare the linealized curve and its fitted line % Extract the line parameters (y=ax+b) using the polyfit function % Check wether the vectors contain inifinite values, if so, remove them % Wind Engineering and Industrial Aerodynamics, 85 :1 75�84, 2000 % the Weibull wind speed distribution for wind energy analysis, Journal of and Lambert, T.W., Modern estimation of the parameters of % for wind energy applications, Energy Conversion and Management, and Dinler, A., A new method to estimate Weibull parameters % See the following references for more explanations: %% EXTRACT THE PARAMETERS USING A GRAPHICAL METHOD Title('Cumulative distribution extracted from the time series') Title('Distribution extracted from the time series') % Get the frequency of occurence of each unique value % contains the difference between two consecutive unique valuesĭelta(i) = uniqueVals(i) - uniqueVals(i-1)
% real wind speed of 2.05 or 1.98 m/s), compute the delta vector which % (i.e., a measured wind speed of 2.0 m/s may actually correspond to a % To take into account the measurement resolution % Find the number of occurences of each unique wind speed value
#Wind rose diagram calculation series#
% Extract the unique values occuring in the series
% Remove nil speed data (to avoid infeasible solutions in the following)
#Wind rose diagram calculation code#
Note: I am posting the entire code below if anyone wants to read it: %% EXTRACT AND PLOT RAW DATA How can the program run in Octave and now produces such an error, I don't understand.ĭoes anyone have an idea of what this error means? Is not a valid property for WindRose function.Įrror in octavetestoforiginalprogram (line 184) I run the program in a new version of matlab and then I got the following message: Error using WindRose (line 244) Today with Octave in a Ubuntu machine and after some efforts I managed to get a result with a minor problem: the wind rose did not had all the information it should have. I've been working yesterday on a very old matlab edition and I had serious problems with making the code run. The wind rose program is essentially here: The main program is such that after plotting several plots on the Weibull distribution, it calls another matlab program to produce a wind rose. I am currently trying to plot in matlab a wind rose diagram with data wind velocities and directions for a given period.