* Elementwise division of two columns in table
@ 2018-09-17 20:36 Nishan Singh Mann
2018-09-18 9:20 ` Eric S Fraga
0 siblings, 1 reply; 3+ messages in thread
From: Nishan Singh Mann @ 2018-09-17 20:36 UTC (permalink / raw)
To: Emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
Given a table of the form
| a | b | c |
|[2,3] | [4,6] | formula
What is the formula for column C such that elementwise division is
performed to obtain [2,2]. I realize I've to use the (calc-map OPR)
function but I am not an expert in elisp. Thanks for reading.
Regards,
Nishan
--
Nishan Singh Mann
[-- Attachment #2: Type: text/html, Size: 496 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Elementwise division of two columns in table
2018-09-17 20:36 Elementwise division of two columns in table Nishan Singh Mann
@ 2018-09-18 9:20 ` Eric S Fraga
2018-09-18 19:36 ` Nishan Singh Mann
0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2018-09-18 9:20 UTC (permalink / raw)
To: Nishan Singh Mann; +Cc: Emacs-orgmode
On Monday, 17 Sep 2018 at 16:36, Nishan Singh Mann wrote:
> Given a table of the form
> | a | b | c |
> |[2,3] | [4,6] | formula
>
> What is the formula for column C such that elementwise division is
> performed to obtain [2,2]. I realize I've to use the (calc-map OPR)
> function but I am not an expert in elisp. Thanks for reading.
> Regards,
> Nishan
Try
| a | b | c |
| [2,3] | [4,6] | [0.5, 0.5] |
#+TBLFM: @2$3=map(div,$1,$2)
--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Elementwise division of two columns in table
2018-09-18 9:20 ` Eric S Fraga
@ 2018-09-18 19:36 ` Nishan Singh Mann
0 siblings, 0 replies; 3+ messages in thread
From: Nishan Singh Mann @ 2018-09-18 19:36 UTC (permalink / raw)
To: Emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 676 bytes --]
This works. Thanks Eric.
On Tue, 18 Sep 2018 at 05:20 Eric S Fraga <esflists@gmail.com> wrote:
> On Monday, 17 Sep 2018 at 16:36, Nishan Singh Mann wrote:
> > Given a table of the form
> > | a | b | c |
> > |[2,3] | [4,6] | formula
> >
> > What is the formula for column C such that elementwise division is
> > performed to obtain [2,2]. I realize I've to use the (calc-map OPR)
> > function but I am not an expert in elisp. Thanks for reading.
> > Regards,
> > Nishan
>
> Try
>
> | a | b | c |
> | [2,3] | [4,6] | [0.5, 0.5] |
> #+TBLFM: @2$3=map(div,$1,$2)
>
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4
>
--
Nishan Singh Mann
[-- Attachment #2: Type: text/html, Size: 1126 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-18 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-17 20:36 Elementwise division of two columns in table Nishan Singh Mann
2018-09-18 9:20 ` Eric S Fraga
2018-09-18 19:36 ` Nishan Singh Mann
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).