Note that for laziness I'm assuming that you'll ALWAYS be starting from zero. Also, the allocate will only work if the maximum divided by the "stride" is an integer.

Rather than specify it like matlab does with the meshgrid command (I had to look it up), I would specify and a range and a number of points. That way the allocate is easy (allocate to number of points), and the interval is simply the range divided by the number of points.

Either way, it'll get you close. You'll need to put the actual variables in there somehow, by either direct specification or by read/write commands; up to you.