Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Meaning of [[1]] at end of Do?' topicStudent Support Forum > General > "Meaning of [[1]] at end of Do?"

Next Comment >Help | Reply To Topic
Author Comment/Response
fpgh
06/11/12 1:42pm

Hi,

I'm trying to decipher the following code:


Do[c[i] =
c[i] /. Solve[veqexp[n] == 0, c[i]][[1]], {i, 1, n}]

It clearly solves an equation (that involves c[i]) for c[i]. then updates this c[i] and moves on to the next, but what is the purpose of [[1]] here? Is it just taking the first of possibly many solutions or something?

thanks for any help.

URL: ,

Subject (listing for 'Meaning of [[1]] at end of Do?')
Author Date Posted
Meaning of [[1]] at end of Do? fpgh 06/11/12 1:42pm
Re: Meaning of [[1]] at end of Do? Bill Simpson 06/12/12 9:36pm
Re: Meaning of [[1]] at end of Do? Michael 06/13/12 07:03am
Next Comment >Help | Reply To Topic