MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Part Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132259] Re: Part Function
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Fri, 24 Jan 2014 04:21:38 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

I have a Mathematica script containing the following line:

v[k_] := SetAccuracy(2*(Part[Q1[[k]],1]),45]

where Q1 is a 96 x 96 matrix.

Is Part[Q1[[k]],1] the same as Q1[k,1]?  If not, what is it returning?

Any help appreciated.


Hi, Fred,
It is easy to see what is it by generating a simple example. Let us define a small matrix
as follows:

Q[k_] := {{k + 1, k - 1}, {k^2, 1/k}}

You can have a look at it. Evaluate this:

Q[k] // MatrixForm.

Now the expression you are asking about is:

Part[Q[k], 1]

Evaluate it! The result is below:

{1 + k, -1 + k}

Thus, it returns the first line of the matrix.

Have fun,  Alexei

Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu





  • Prev by Date: Re: How does TensorReduce use assumptions?
  • Next by Date: Re: How does TensorReduce use assumptions?
  • Previous by thread: Re: Part Function
  • Next by thread: How does TensorReduce use assumptions?