Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Part Function
Posted:
Jan 24, 2014 4:19 AM


As you say, Q1 is a 96 x 96 matrix, i.e., a list of 96 lists, each of which has 96 elements. Hence Part[Q1[[k]],1] (which you may also write as Q1[[k,1]] or even Q1[[k]][[1]]) has a clear meaning. The expression Q1[k,1] is meaningless (since Q1 is not a function) and will return exactly the same thing you typed as input. (Unless, of course, you have previously defined an Array (q.v.) with the name Q1, but that is another matter). By the way, use of uppercase is not recommended for the first letter in the names of variables, as they may be confused with Mathematica symbols. Tomas
> From: fnajmy@gmail.com > Subject: Part Function > To: mathgroup@smc.vnet.net > Date: Thu, 23 Jan 2014 03:34:45 0500 > > 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. >



