Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
00681a3c
Commit
00681a3c
authored
May 16, 2010
by
Jay Belanger
Browse files
calc-vec.el (math-vector-avg): Put the vector elements in order
before computing the averages.
parent
7ca1f3f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/calc/calc-vec.el
lisp/calc/calc-vec.el
+1
-1
No files found.
lisp/ChangeLog
View file @
00681a3c
2010-05-17 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-vec.el (math-vector-avg): Put the vector elements in
order before computing the averages.
2010-05-16 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-vec.el (calc-histogram):
...
...
lisp/calc/calc-vec.el
View file @
00681a3c
...
...
@@ -1178,7 +1178,7 @@
;;; Replace a vector [a b c ...] with a vector of averages
;;; [(a+b)/2 (b+c)/2 ...]
(
defun
math-vector-avg
(
vec
)
(
let
((
vp
(
cdr
vec
))
(
let
((
vp
(
sort
(
copy-sequence
(
cdr
vec
))
'math-beforep
))
(
res
nil
))
(
while
(
and
vp
(
cdr
vp
))
(
setq
res
(
cons
(
math-div
(
math-add
(
car
vp
)
(
cadr
vp
))
2
)
res
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment