Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Simple programming question' topicStudent Support Forum > General > "Simple programming question"

Next Comment >Help | Reply To Topic
Author Comment/Response
David Andersson
11/30/10 1:51pm

Hi,

I'm trying to move over from matlab to mathamatica. Things have gone rather well up until now. I'm currently trying to lern how to do simple loops, for an hour or so I have been stuck with this simple one:

A = {{q, w}, {e, r}, {t, y}};
For[g = 1, g < 4,
g = g + 1,
h = A[[g, 1]] Print[h]];

I basically want to pick out elements from a matrix. Also I want to store the matrix elements, h, in a table.

Any ideas?

Cheeres,
David from Sweden

URL: ,

Subject (listing for 'Simple programming question')
Author Date Posted
Simple programming question David Anders... 11/30/10 1:51pm
Re: Simple programming question Adrian 12/02/10 06:30am
Next Comment >Help | Reply To Topic