piirrä normaalijakauma arvoille: 2, 5, 6, 9, 11 in matlab

main.m
data = [2, 5, 6, 9, 11];  % Data points

mu = mean(data);  % Mean of data
sigma = std(data);  % Standard deviation of data

x = mu - 3*sigma:0.01:mu + 3*sigma;  % Range for x-axis
y = normpdf(x, mu, sigma);  % Normal distribution values for the range

plot(x, y);
title('Normal Distribution');
xlabel('X');
ylabel('Probability Density');
338 chars
13 lines

gistlibby LogSnag