For example, if I want to read the middle value from magic(5), I can do so like this:
magic(5)
M = magic(5); value = M(3,3);
to get
unfortunately syntax like magic(5)(3,3) is not supported by matlab. you need to use temporary intermediate variables. you can free up the memory after use, e.g.
magic(5)(3,3)
tmp = magic(3); myVar = tmp(3,3); clear tmp