Trying to remove Nans when plotting histogram, pdf and cdf
Mostrar comentarios más antiguos
clear;
load InsulinReadings.mat
xX2 = InsulinReadings;
xX2(xX2==0)=missing;
A2 = mean(xX2,'all',"omitnan")
B2 = median(xX2,'all',"omitnan")
C2 = max(xX2,[],'all',"omitnan")
D2 = min(xX2,[],'all', "omitnan")
figure
histogram(InsulinReadings(~isnan(InsulinReadings),128,'Normalization')
xlabel('Insulin ng/dL')
%Now get pdf
[D PD] = allfitdist(xX2,'PDF');
xlabel('Insulin ng/dL');
%Now get the CDF
[D PD] = allfitdist(xGlucoseReadings,'CDF');
xlabel('Insulin ng/dL')
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Distribution Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





