Re: matrix with only 1 numbers
- From: Hal Ashburner <hal ashburner info>
- To: Andreas Guelzow <aguelzow pyrshep ca>
- Cc: "gnumeric-list gnome org" <gnumeric-list gnome org>
- Subject: Re: matrix with only 1 numbers
- Date: Wed, 25 Jul 2012 23:51:08 +1000
hehe, I like it.
But can I just float the idea that at the point you don't want to store things visibly in a spreadsheet that using {python,perl,ruby,haskell,ocml,scala} is a better way to go than using a spreadsheet?
What do you think? Crazy talk?
On 25 July 2012 23:24, Andreas Guelzow
<aguelzow pyrshep ca> wrote:
On Wed, 2012-07-25 at 14:18 +0200, Frederic Parrenin wrote:
>
> Is there a way to create a nxm matrix with only '1' numbers inside?
> (a bit like the munit(n) function)
>
Hal's suggestion assumes that you want to store the matrix directly on
the sheet and the size is determined by the size of the selection.
If you want to create an 3 by 3 matrix of 1s for use in a formula
without storing it first on a sheet you can use
((munit(3)+1)-munit(3))
Non-square matrices are more difficult. I can get a 3 by 2 matrix via
(array(1,1,1)*transpose(array(1,1)))
If I want to create a large matrix, say 100 by 50 without listing a
block of 100 1s and another of 50 1s I would use:
=array(row(A1:A100)/row(A1:A100))*transpose(array(row(A1:A50)/row(A1:A50)))
I hope that helps
Andreas
--
Andreas J. Guelzow, PhD, FTICA
Concordia University College of Alberta
--
Andreas Guelzow <aguelzow pyrshep ca>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]