comp.lang.ada
 help / color / mirror / Atom feed
From: "Johan Söderlind Åström" <johaa1993@gmail.com>
Subject: Re: how to copy complete column (or row) of matrix to another?
Date: Tue, 12 Sep 2017 14:22:27 -0700 (PDT)
Date: 2017-09-12T14:22:27-07:00	[thread overview]
Message-ID: <8e03d3b0-e87d-4ec5-a56d-0c44b610b8b6@googlegroups.com> (raw)
In-Reply-To: <oolo0a$1djr$1@gioia.aioe.org>

Instead of slicing:

   A : Real_Matrix (1 .. 3, 1 .. 3) :=
     ((1.0,  2.0,  3.0),
      (4.0,  5.0,  6.0),
      (7.0,  8.0,  9.0));
   C : Real_Vector (1 .. 3) := (0.0, 0.0, 1.0);
   B1 : Real_Vector (1 .. 3) := A * C; -- Extract column 3.
   B2 : Real_Vector (1 .. 3) := Transpose (A) * C; -- Extract row 3.

  parent reply	other threads:[~2017-09-12 21:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05  8:41 how to copy complete column (or row) of matrix to another? Nasser M. Abbasi
2017-09-05 22:45 ` Randy Brukardt
2017-09-05 23:10   ` Nasser M. Abbasi
2017-09-06  5:34     ` faryumg
2018-03-21 13:58       ` Marius Amado-Alves
2018-03-30 21:25         ` gerdien.de.kruyf
2017-09-06  7:17     ` Simon Wright
2017-09-06  7:31   ` Dmitry A. Kazakov
2017-09-09 22:33 ` darek
2017-09-09 22:48 ` darek
2017-09-12 12:57   ` Lucretia
2017-10-02 23:08     ` Randy Brukardt
2017-09-12 21:22 ` Johan Söderlind Åström [this message]
2017-09-17 12:01 ` Robert Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox