From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishan Singh Mann Subject: Re: Elementwise division of two columns in table Date: Tue, 18 Sep 2018 15:36:15 -0400 Message-ID: References: <87h8inmabh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e5663205762a6774" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2LnS-0003JF-17 for Emacs-orgmode@gnu.org; Tue, 18 Sep 2018 15:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2LnR-0003vV-7b for Emacs-orgmode@gnu.org; Tue, 18 Sep 2018 15:36:29 -0400 Received: from mail-yb1-xb35.google.com ([2607:f8b0:4864:20::b35]:38604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2LnR-0003us-1n for Emacs-orgmode@gnu.org; Tue, 18 Sep 2018 15:36:29 -0400 Received: by mail-yb1-xb35.google.com with SMTP id e190-v6so1350467ybb.5 for ; Tue, 18 Sep 2018 12:36:28 -0700 (PDT) In-Reply-To: <87h8inmabh.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Emacs-orgmode@gnu.org --000000000000e5663205762a6774 Content-Type: text/plain; charset="UTF-8" This works. Thanks Eric. On Tue, 18 Sep 2018 at 05:20 Eric S Fraga 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 --000000000000e5663205762a6774 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 Sin= gh 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=C2=A0 =C2=A0 =C2=A0| b=C2=A0 =C2=A0 =C2=A0| c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 |
| [2,3] | [4,6] | [0.5, 0.5] |
#+TBLFM: @2$3=3Dmap(div,$1,$2)


--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.11-620-ga548e4
--
Nishan Singh Mann
--000000000000e5663205762a6774--