diff options
| author | Jay Belanger | 2007-08-04 04:33:07 +0000 |
|---|---|---|
| committer | Jay Belanger | 2007-08-04 04:33:07 +0000 |
| commit | def4f741fcdc831e203518b042f0f056458a3cf2 (patch) | |
| tree | 3210d89e299f843ed5d4ffc79186cb4feb90210e | |
| parent | fa92d805be21e47724999588e3f22eeaebdf280b (diff) | |
| download | emacs-def4f741fcdc831e203518b042f0f056458a3cf2.tar.gz emacs-def4f741fcdc831e203518b042f0f056458a3cf2.zip | |
(calc-curve-fit): Add "plot" indicator.
| -rw-r--r-- | lisp/calc/calcalg3.el | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index 611e2d7f45d..287eb114ac2 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el | |||
| @@ -134,9 +134,12 @@ | |||
| 134 | "P prefix = plot result" | 134 | "P prefix = plot result" |
| 135 | "' = alg entry, $ = stack, u = Model1, U = Model2"))) | 135 | "' = alg entry, $ = stack, u = Model1, U = Model2"))) |
| 136 | (while (not calc-curve-model) | 136 | (while (not calc-curve-model) |
| 137 | (message "Fit to model: %s:%s" | 137 | (message |
| 138 | (nth which msgs) | 138 | (if plot |
| 139 | (if homog " h" "")) | 139 | "Fit to model (plot): %s:%s" |
| 140 | "Fit to model: %s:%s") | ||
| 141 | (nth which msgs) | ||
| 142 | (if homog " h" "")) | ||
| 140 | (setq key (read-char)) | 143 | (setq key (read-char)) |
| 141 | (cond ((= key ?\C-g) | 144 | (cond ((= key ?\C-g) |
| 142 | (keyboard-quit)) | 145 | (keyboard-quit)) |
| @@ -145,13 +148,15 @@ | |||
| 145 | ((memq key '(?h ?H)) | 148 | ((memq key '(?h ?H)) |
| 146 | (setq homog (not homog))) | 149 | (setq homog (not homog))) |
| 147 | ((= key ?P) | 150 | ((= key ?P) |
| 148 | (let ((data (calc-top 1))) | 151 | (if plot |
| 149 | (if (or | 152 | (setq plot nil) |
| 150 | (calc-is-hyperbolic) | 153 | (let ((data (calc-top 1))) |
| 151 | (calc-is-inverse) | 154 | (if (or |
| 152 | (not (= (length data) 3))) | 155 | (calc-is-hyperbolic) |
| 153 | (setq plot "Can't plot") | 156 | (calc-is-inverse) |
| 154 | (setq plot data)))) | 157 | (not (= (length data) 3))) |
| 158 | (setq plot "Can't plot") | ||
| 159 | (setq plot data))))) | ||
| 155 | ((progn | 160 | ((progn |
| 156 | (if (eq key ?\$) | 161 | (if (eq key ?\$) |
| 157 | (setq n 1) | 162 | (setq n 1) |