(def data '(63.18577 57.58177 55.477417 67.76124 81.17563 117.06769 142.56798 170.71129 183.42279 166.46387 154.70522 107.563934 74.49528 62.67024 44.03627 37.325176 41.743484 39.775467 31.423569 49.01825) ) (let* ( (n (first (where data (max data)))) (x (iseq (- n 3) (+ n 3))) ) (def nreg (nreg-model (lambda(theta) (+ (* (first theta) (^ x 2) ) (* (second theta) (^ x 1) ) (third theta) ) ) (select data x) (list 1 1 1) ) ) ) (def theta (send nreg :beta)) (defun f(x) (+ (* (first theta) (^ (- x 1) 2) ) (* (second theta) (- x 1) ) (third theta) ) ) (xgobips "quadratic.ps" 0 0 0 (iseq 1 (length data)) data :glyph-type 2 :glyph-size 5 :morelines (list (list 0 0 1 (rseq 0 (length data) 100) (mapcar #'f (rseq 0 (length data) 100)) "lndashed") ) :xlabel "Image Number" :ylabel "Neighborhood Variance" :xtickfmt "~d" :ytickfmt "~d" )