Michael,
This is great. I wish I had seen this earlier. I did not know about the subscr
function, but I had basically gotten to the same point by writing an equivalent
custom calc function.
I understand that using a calc function in a table formula is inefficient,
since it is executed for
Michael,
Here is the custom calc function that is similar to subscr. It will work for
both vectors and matrices:
(defmath getElem (indices m)
(let (i j)
(if (vectorp indices)
(progn
(setq i (cadr indices))
(setq j (nth 2 indices))
(nth j (nth i m))
)
Hi Steven
On Tue, May 27, 2014 at 11:12 AM, Steven Adrian sadr...@acumeniacal.com wrote:
Here is the custom calc function that is similar to subscr. It will
work for both vectors and matrices:
(defmath getElem (indices m)
(let (i j)
(if (vectorp indices)
(progn
(setq i
Hi Steven
On Mon, May 26, 2014 at 9:39 PM, Steven Adrian sadr...@acumeniacal.com wrote:
This is great. I wish I had seen this earlier. I did not know about
the subscr function, but I had basically gotten to the same point by
writing an equivalent custom calc function.
With the Calc function
Hi Steven
Steven Adrian sadr...@acumeniacal.com writes:
#+TBLFM: @1$1..@1$10=index(10)
But the formula above just puts the whole vector in each cell. Can anyone
tell me how to put the vector values in individual cells?
The vector elements can be accessed with Calc subscr() and Org field
Hi Steven,
Steven Adrian sadr...@acumeniacal.com writes:
#+TBLFM: @1$1..@1$10=index(10)
Table formulas apply to individual fields, not to a range of fields.
But the formula above just puts the whole vector in each cell. Can anyone
tell me how to put the vector values in individual cells?
I would like to insert a calc vector directly into a range of spreadsheet
cells from a function. As a specific example, consider the calc index
function, which returns a calc vector of integers from 1 to n. Once calc has
started within an emacs session, the index function can be accessed from