Puoi aprire il codice e modificare la funzione: vedi l'Help
You can open the Code and modify the function: see the Help
HELP

// I: estremi degli intervalli, P: frequenze
A=53.5; W=7                              // estremo sinistro e larghezza degli intervalli
I=[ A, A+W,A+W*2,A+W*3,A+W*4,A+W*5,A+W*6,A+W*7,A+W*8,A+W*9,A+W*10,A+W*11 ]
P=[  4,  39,  122,  197,  192,  126,   93,   33,   16,    2,     1 ]; NP = P.length
SUM=0; for(i=0;i < NP;i=i+1)  {SUM=SUM+P[i]}
mean=0; for(i=0;i < NP;i=i+1) {mean=mean+P[i]*(I[i]+I[i+1])/2}; mean=mean/SUM
Tot=0; for(i=0;i < NP;i=i+1) {Tot=Tot+P[i]}; for(i=0;i < NP;i=i+1) {P[i]=P[i]/Tot/(I[i+1]-I[i])}
LLx=[]; j=0; for(i=1;i<=NP;i=i+1) { LLx[j]=I[i-1]; LLx[j+1]=I[i-1]; LLx[j+2]=I[i]; LLx[j+3]=I[i]; j=j+4 }
LLy=[]; j=0; for(i=1;i<=NP;i=i+1) { LLy[j]=0; LLy[j+1]=P[i-1]; LLy[j+2]=P[i-1]; LLy[j+3]=0; j=j+4 }

function f(x) { y = 1/0; return y }
function g(x) { y = 1/0; return y }
function h(x) { y = 1/0; return y }   // definita sotto
function k(x) { y = 1/0; return y }

aX = 30; bX = 140; aY = 0; bY = 0.04
Dx = 10; Dy = 0.01

sigma = 11.51212
function h(x) { y = Math.exp( -Math.pow((x-mean)/sigma,2)/2) / Math.sqrt(2*Math.PI)/sigma; return y}

Lx=LLx; Ly=LLy
Q2x=[mean]; Q2y=[0]

AX=BX=AY=BY=""
BY="mean = " + Math.round(mean*1000)/1000

AAX=aX; BBX=bX; AAY=aY; BBY=bY