From: Christopher Dimech <dimech@gmx.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Using Calc
Date: Wed, 5 May 2021 13:58:36 +0200 [thread overview]
Message-ID: <trinity-7e4e8bb1-b9df-4d8c-bea9-a68598e152cd-1620215916786@3c-app-mailcom-bs16> (raw)
In-Reply-To: <874kfhwgt0.fsf@ucl.ac.uk>
> Sent: Wednesday, May 05, 2021 at 11:39 PM
> From: "Eric S Fraga" <e.fraga@ucl.ac.uk>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Using Calc
>
> On Wednesday, 5 May 2021 at 13:31, Christopher Dimech wrote:
> > The following gets matrix multiplication
> >
> > [ [1.,2.,3.] [4.,5.,6.] [7.,8.,9.] ] * [ [9.,8.,7.] [6.,5.,4.] [3., 2.,1.] ] =>
> >
> > It is then very easy to end up with very long lines. Is there a
> > solution to this?
>
> I get:
>
> [ [ 1., 2., 3. ] [ [ 9., 8., 7. ] [ [ 30., 24., 18. ]
> [ 4., 5., 6. ] * [ 6., 5., 4. ] => [ 84., 69., 54. ]
> [ 7., 8., 9. ] ] [ 3., 2., 1. ] ] [ 138., 114., 90. ] ]
--------
Doing the following, removes the *
[1, 2, 3] * [4, 2, 6] =>
--------
But the next keeps the +
[1, 2, 3] + [4, 7, 6] =>
It would be better if things remain consistent and we keep the *
--------
And with these two, one can change the values, re-evaluates
and get the correct values
[1, 2, 3] + [4, 133, 6] => [5, 135, 9]
[1, 2, 3] [4, 123, 6] => 268
--------
But with the following,
[ [ 1., 2., 3. ] [ [ 9., 8., 7. ] [ [ 30., 24., 18. ]
[ 4., 5., 6. ] * [ 6., 5., 4. ] => [ 84., 69., 54. ]
[ 7., 8., 9. ] ] [ 3., 2., 1. ] ] [ 138., 114., 90. ] ]
If you try to change a value, everything gets messed up
[ [ 1., 123., 3. ] [ [ 9., 8., 7. ] [ [ 30., 24., 18. ]
[ 4., 5., 6. ] * [ 6., 5., 4. ] => [ 84., 69., 54. ]
[ 7., 8., 9. ] ] [ 3., 2., 1. ] ] [ 138., 114., 90. ] ]
> as a result so not long lines at all? Of course, if your system gets
> larger, there will be an issue but then I would suggest you use a
> different language (octave for numerics, maxima for symbolic, both
> usable via org babel src blocks if you wish). I.e. use the right tool
> for the job?
>
> --
> Eric S Fraga via Emacs 28.0.50 & org 9.4.5 on Debian bullseye/sid
>
>
>
next prev parent reply other threads:[~2021-05-05 11:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 5:58 Using Calc Christopher Dimech
2021-05-05 6:04 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 10:23 ` Christopher Dimech
2021-05-05 10:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 10:42 ` Christopher Dimech
2021-05-05 11:15 ` Christopher Dimech
2021-05-05 11:21 ` Eric S Fraga
2021-05-05 11:31 ` Christopher Dimech
2021-05-05 11:39 ` Eric S Fraga
2021-05-05 11:48 ` Christopher Dimech
2021-05-05 11:58 ` Eric S Fraga
2021-05-05 12:42 ` Christopher Dimech
2021-05-05 13:00 ` Christopher Dimech
2021-05-05 14:16 ` Christopher Dimech
2021-05-05 21:37 ` Nick Dokos
2021-05-05 21:53 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-06 7:18 ` tomas
2021-05-05 11:58 ` Christopher Dimech [this message]
2021-05-05 14:58 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-05 15:23 ` Christopher Dimech
2021-05-05 16:44 ` Eric S Fraga
2021-05-05 17:25 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-05 17:33 ` Gregory Heytings
2021-05-05 18:52 ` Tassilo Horn
2021-05-05 20:46 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-05 21:01 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-06 7:51 ` Gregory Heytings
2021-05-05 19:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-06 4:33 ` Bob Newell
2021-05-05 14:52 ` Emanuel Berg via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-7e4e8bb1-b9df-4d8c-bea9-a68598e152cd-1620215916786@3c-app-mailcom-bs16 \
--to=dimech@gmx.com \
--cc=e.fraga@ucl.ac.uk \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).