Here's one way to create a matrix with the second column from the left and second column from the right equal to the column number. We can accomplish this using a nested for loop with conditional logic to set the appropriate values in each column.
main.m494 chars28 lines
This will output a matrix where the second column from the left and second column from the right are equal to the column number:
main.m85 chars6 lines
gistlibby LogSnag