[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiple calc commands with orgbabel
From: |
pietru |
Subject: |
Re: Multiple calc commands with orgbabel |
Date: |
Wed, 5 May 2021 08:40:09 +0200 |
> Sent: Wednesday, May 05, 2021 at 6:33 PM
> From: "Eric S Fraga" <e.fraga@ucl.ac.uk>
> To: pietru@caramail.com
> Cc: "help Emacs Orgmode" <emacs-orgmode@gnu.org>
> Subject: Re: Multiple calc commands with orgbabel
>
> On Wednesday, 5 May 2021 at 07:46, pietru@caramail.com wrote:
> > Have been trying to execute multiple calc commands, but when I
> > evaluate the calc expressions, I get just one result.
>
> ob-calc returns the top element of the stack when finished and this will
> be the result of the last operation in the src block. I don't think
> there's any way around this.
Is the top stack element just with ob-calc?
> I use embedded Calc for this reason. You could rewrite your equations
> as simple lines (separated by empty lines from the surroundings) and
> evaluate each in turn with "C-x * u":
>
> fsolve(x 2 + x = 4, x) => x = 1.33333333333
>
> fsolve([x + y = a, x - y = b], [x, y]) => [x = a + (b - a) / 2, y = (a - b) /
> 2]
>
> I added the "=>" at the end of each expression so that the result is
> shown to the right instead of replacing the expression itself (default
> embedded Calc behaviour).
Will check it out, thanks.
> --
> : Eric S Fraga via Emacs 28.0.50, Org release_9.4.5-395-g82fbdd
>
>
- Multiple calc commands with orgbabel, pietru, 2021/05/05
- Re: Multiple calc commands with orgbabel, Eric S Fraga, 2021/05/05
- Re: Multiple calc commands with orgbabel,
pietru <=
- Re: Multiple calc commands with orgbabel, Matt Price, 2021/05/05
- Re: Multiple calc commands with orgbabel, Eric S Fraga, 2021/05/05
- Re: Multiple calc commands with orgbabel, Tom Gillespie, 2021/05/05
- Re: Multiple calc commands with orgbabel, Bastien, 2021/05/06
- Re: Multiple calc commands with orgbabel, Tom Gillespie, 2021/05/06
- Re: Multiple calc commands with orgbabel, Bastien, 2021/05/07