I am new to Mathematica and I am very impressed with its features. Although I don't understand how to do a simple thing: for example, I want to create few point variables (say a,b,c,d,e), each storing its x and y coordinates. In Java, I would write something like this:
class Point {
float x;
float y;
}
...
Point a;
a.x = 2,5;
a.y = 1,2;
How do I do same thing in Mathematica? Thank you!
n
-dimensional points/vectors as lengthn
lists; e.g.a = {2.5, 1.2}
. $\endgroup$Part[]
andExtract[]
in the documentation. Try e.g.a[[1]]
. $\endgroup$