Are there ways to populate a 5x5 matrix with values 101..505 without using loops?
Surely there are ways! Loop version: ii = 1::5; jj = 1::5;
m = j(5,5);
foreach({i}, ii,
foreach({j}, jj,
m[i,j] = i*100 + j
)
);
m;
#=> [ 101 102 103 104 105,
201 202 203 204 205,
301 302 303 304 305,
401 402 403 404 405,
501 502 503 504 505];
Multiple solutions encouraged, if you have them! I'm trying to "get fluent" in matrices.