Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7758

take square of the second and third column of a table

From hanciong awesome <hanciong@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject take square of the second and third column of a table
Date 2012-01-11 22:21 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jel20o$lkl$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hello, suppose I have a very long table like this:

1 2 3
4 5 6
7 8 9
.......
2 3 4

how can I take square of the 2nd and 3rd column? I always do it by
making a new table. so let's say the above table is A and it has 100
lines, then I make the new table as the following:

B=Table[{A[[n]][[1]],A[[n]][[2]]^2,A[[n]][[3]]^2},{n,1,100}]

But if the length of the table is unknown, this way is impractical.
Could anyone suggests better way? thank you

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

take square of the second and third column of a table hanciong awesome <hanciong@gmail.com> - 2012-01-11 22:21 +0000
  Re: take square of the second and third column of a table "Nasser M. Abbasi" <nma@12000.org> - 2012-01-12 09:20 +0000
  Re: take square of the second and third column of a table "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2012-01-12 09:22 +0000
  Re: take square of the second and third column of a table "Nasser M. Abbasi" <nma@12000.org> - 2012-01-12 09:23 +0000
  Re: take square of the second and third column of a table Helen Read <readhpr@gmail.com> - 2012-01-12 09:20 +0000

csiph-web