Re: [O] unexpected failure on all formulas

2011-09-20 Thread Christian Moe
Hi, Nick, No whacks intended! It was an easy catch because I was mulling over similar problems with my code. My own second pass at a vmode implementation for Calc is below, now with support for negative values and bimodal data. It takes a different route and is a bit shorter, but doesn't hand

Re: [O] unexpected failure on all formulas

2011-09-20 Thread Nick Dokos
Nick Dokos wrote: > All in all, a disaster: can a posting be deleted? or at least marked > with a big, red X so that it won't mislead in the future? I'll try to > post a corrected version later on. > Here's an attempt to correct the problems that Christian, Lawrence and I found in my previous a

Re: [O] unexpected failure on all formulas

2011-09-20 Thread Nick Dokos
Christian Moe wrote: > I think your vmode() needs to subtract one from the result. The mode > in the "systolic" column of Jude's dataset should be 124 (f=12), not > 125 (f=2). > Yes, this is an off-by-one error: in vfreqs, I should cons prev onto freqs, not (nth 0 vec). In addition to this and

Re: [O] unexpected failure on all formulas

2011-09-20 Thread Christian Moe
Hi, Nick, I think your vmode() needs to subtract one from the result. The mode in the "systolic" column of Jude's dataset should be 124 (f=12), not 125 (f=2). For Jude's limited purposes I got by with less code (but note the caveats): #+begin_src emacs-lisp (defmath vmode (vec) "Retu

Re: [O] unexpected failure on all formulas

2011-09-20 Thread Lawrence Mitchell
Nick Dokos wrote: [...] > I cribbed heavily from the implementation of vmedian. Although there is > no key binding, you can even use the above in an interactive Calc > session, by entering the formula in algebraic form. I yanked the vector > twice onto the Calc stack and then entered 'vmode($) wi

Re: [O] unexpected failure on all formulas

2011-09-20 Thread Nick Dokos
Nick Dokos wrote: > Jude DaShiell wrote: > > > > |+--+---+---| > > | mode | | | | > > | Min| | | | > > | Max| 127. | 81. | 74. | >

Re: [O] unexpected failure on all formulas

2011-09-19 Thread Nick Dokos
Jude DaShiell wrote: > |+--+---+---| > | mode | | | | > | Min| | | | > | Max| 127. | 81. | 74. | > #+TBLFM: @>>>$2..@>>>$4=vmode(@i.

[O] unexpected failure on all formulas

2011-09-19 Thread Jude DaShiell
cut here. | Date Stamp | Systalic | Diastalic | Pulse | |+--+---+---| | [2011-07-19 Tue 02:26] | 138 |92 |74 | | [2011-07-20 Wed 04:03] | 130 |85 |74 | | [2011-07-21 Thu 03:50] | 128 |79 |76 |