Hi All,
I have a the attached data and I am trying to plot a the data and fit it into a normal distribution but it looks like the output is not coming out as i expect. The values on the X and the Y axes are not from my data set. Can someone please help fix this. I have attached the code, dataset and the output im getting.
%% Set up the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 7);
%
%% Specify range and delimiter
opts.DataLines = [16, Inf];
opts.Delimiter = "\t";
%
%% Specify column names and types
opts.VariableNames = ["VarName1", "VarName2", "VarName3", "VarName4", "VarName5", "VarName6", "VarName7"];
opts.VariableTypes = ["datetime", "datetime", "double", "double", "double", "double", "double"];
%
%% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
%
%% Specify variable properties
opts = setvaropts(opts, "VarName1", "InputFormat", "dd/MM/yyyy");%dd-MMMM-yyyy HH:mm:ss
opts = setvaropts(opts, "VarName2", "InputFormat", "HH:mm:ss");
%% Import the data
DATA = readtable("E:\Data\2020\B220_DT80\weekly\Jan to May 2021\01Jan2021_8Jan2021.txt", opts);
%% Select the data for processing
D1 = DATA.VarName4;
% D2 = DATA.VarName4;
%% Histogram analysis
DL=8640;
Day1 = D1(1:DL);
...
figure(1)
histfit(Day1)
...