可以在组织模式表中使用递归单元格公式吗? [英] Is it possible to use recursive cell formulas in org-mode tables?
问题描述
我想建立一个以常数(例如1)开头的列,其后续行是前一行的两倍(或者在公式中设置的一些变量系数):
I'd like to build a column that begins with a constant, say, 1, and whose succeeding rows are double the preceding row (or some variable coefficient I set in the formula):
| 1 |
| 2 |
| 4 |
| 8 |
| 16 |
有没有办法在Emacs中快速设置?我看到有行公式,列公式和矩形区域公式,但是在手册中没有看到任何递归或快速公式复制。
Is there a way to quickly set this up in Emacs? I see that there are row formulas, column formulas, and rectangular region formulas, but I don't see any recursion or quick formula replication in the manual.
推荐答案
#+TBLFM: @1$1=1::@<<..>$1=@-1 * 2
将递归地生成该表。将光标放在最后一行,然后点击 Cu Cu Cc * @< ..>
是从第二个到最后一个行。
will produce that table recursively. Put the cursor on the last row and hit C-u C-u C-c * @<<..>
is a range from second to the last row.
#+TBLFM: @1$1=0::@2$1=1::@<<<..>$1=@-1 + @-2
将产生斐波纳契序列
这篇关于可以在组织模式表中使用递归单元格公式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!