Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'print two variables in colums in a table' topicStudent Support Forum > General > Archives > "print two variables in colums in a table"

Next Comment >Help | Reply To Topic
Author Comment/Response
James
07/20/12 10:27am

Hi,
I've written this simple program:

n = 100;

S = Table["", {t, 1, n}];
G = Table["", {t, 1, n}];

S[[1]] = 15;
G[[1]] = 2.5;

Do[{S[[t]] = 10 - 2*G[[t - 1]] + 0.5*S[[t - 1]];
G[[t]] = -1.875 + 0.25*G[[t - 1]] + 0.375*S[[t - 1]]}, {t, 2, n}];

Now I would like to print the values of S and G in a Table with the values in columns. For istance:
1 20 40
2 30 50
.....
How can I obtain this table?
My best regards,
James

URL: ,

Subject (listing for 'print two variables in colums in a table')
Author Date Posted
print two variables in colums in a table James 07/20/12 10:27am
Re: print two variables in colums in a table jf 07/20/12 12:52pm
Next Comment >Help | Reply To Topic