Glad you enjoyed the video.
This seems like an ODS graphics question rather than an IML question. My understanding is that you want to scale the size of the according to some measure. You can use the ODS GRAPHICS statement like this:
ODS GRAPHICS / WIDTH=w HEIGHT=h;
where w and h are computed in the program and stored in the macro variable.
Another option (and probably what I would do) is to embed all matrices into the largest sized matrix. Then the heat maps will all have the same number of cells and size of cells. For example, the following creates a 4x4 matrix and a 5x5 matrix. To embed the 4x4 matrix into a 5x5 matrix, allocate a 5x5 matrix of all missing values, then use subscripts to assign the 4x4 matrix to certain rows and columns:
proc iml;
ods graphics / width=400px height=400px;
x4 = j(4,4,1); x4[do(2,16,2)]=0; /* 4x4 matrix */
x5 = j(5,5,1); x5[do(2,25,2)]=0; /* 5x5 matrix */
call heatmapdisc(x4);
call heatmapdisc(x5);
/* make cells in x4 the same size as the cells in x5 by
embedding x4 into a 5x5 matrix that has missing values */
newx4 = j(5,5,.);
newx4[1:4, 1:4] = x4;
call heatmapdisc(newx4);
-----
PS. Regarding your program, you don't need to use the FROOT function to solve a quadratic equation. Just use the quadratic formula:
sol = 0.5*(-1 + sqrt(1 - 4*(-2*PRICE)));
Also, on modern versions of SAS, the ROW and COL functions are built-in functions that you do not need to define.