1. Modify the JavaScript code below
  2. Check/uncheck checkboxes
  3. Press [Run]
N = 200; // total number of data points x = new Array(N); // x protein concentration (uM) y = new Array(N); // y protein concentration (uM) X = 30; // constant x protein concentration x[0] = X; // initial x protein concentration y[0] = 0; // initial y protein concentration pXY = 0.4; // production parameter pY = 0.8; // degradation/dilution parameter // fake data generation for (n = 1; n < N; n++) // N-1 loops (1 loop = 1 min) { x[n] = X + 2*random.Gaussian(); y[n] = pXY*x[n-1] + pY*y[n-1] + 2*random.Gaussian(); } // adaptive parameter estimation (Least Mean Squares (LMS) method) est_pXY = new Array(N); // estimated production parameter set est_pY = new Array(N); // estimated degradation/dilution parameter set est_y = new Array(N); // y protein concentration (uM) error = new Array(N); // estimation error (y - est_y) est_pXY[1] = 0; // initial guess for pXY est_pY[1] = 0; // initial guess for pY u = 0.0001; // step size for (n = 1; n < N-1; n++) // N-2 loops (1 loop = 1 min) { est_y[n] = est_pXY[n]*x[n-1] + est_pY[n]*y[n-1] error[n] = y[n]-est_y[n]; est_pXY[n+1] = est_pXY[n] + u*x[n-1]*error[n]; est_pY[n+1] = est_pY[n] + u*y[n-1]*error[n]; }