I'd like to create a matrix, but each object in the matrix uses its index and/or location as parameters. As a simple example, let's say I want to create a matrix of spheres, but the diameter of each sphere depends on its distance from the origin.
2 Answers
You can use a Generators > "Hilbert 3d" node to make the matrix. I'll use this for brevity. Either that or stack a few subdivided planes and join them with Mesh Join.
Each point on the matrix is a Vector, you wanted to check the distance between each vector and the origin vector (0,0,0) and use that distance to scale a sphere placed on that vector point.
here's how to make a more dynamic matrix
import the Gist from the SV import/export panel https://gist.github.com/c0f658e5dab427711f58c1908d470c64
Mesh instances
As zeffii already suggested you can use the scaling of the matrix to change the size of objects depending on their location.
But Sverchok relies heavily on (nested) lists for generating geometry and its generators are vectorized. If you use a single value in one of Sverchok's generators, e.g. for a sphere's radius, and pipe this sphere's vertices into the Viewer Draw node with a some matrix, you will get duplicates of that sphere with the given radius.
If you instead use an array as an input to the Radius node – whether you create that array by hand, e.g. with Float Range, or by using some of the matrix' values – you can generate spheres with variable radii.
This process should also work if you want to change some parameter which can't be changed by a transformation matrix, e.g. the number of vertices in a mesh.