I am trying to calculate the cdf and pdf of the wind speed using data extracted from a dat file using the readtable function:
data1 = readtable('FINO1_windspeed.dat', 'CommentStyle','#');
data1 = standardizeMissing(data1,-999);
DateStrings = data1(:,1);
time_vector = datetime(DateStrings.Variables,'InputFormat','yyyy-MM-dd HH:mm:SS');
windspeedmean = nanmean(data1.(2))
windspeedstd = nanstd(data1.(2))
windspeedvar = nanvar(data1.(2))
pdfwindspeed = pdf('Normal',A)
Where I have defined A as data1(:,2) because all the wind speed data are in the 2nd column. The first column is the time in a format of yyyy:MM:dd HH:mm:SS. The plot works just fine but the problem lays with the cdf and pdf calculations
I also tried A as data1.(2) but i get a long list of NaN.
Can anyone suggest a solution with an explanation for this?
Thanks for your help