Last active
February 17, 2018 17:05
-
-
Save chamathabeysinghe/1f2228b752a2129e257c635884dbabbd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fileM = $M #read the file given by M | |
numRowsToPrint = ifdef($rowsToPrint, 2) # default to 2 | |
numColsToPrint = ifdef($colsToPrint, 2) # default to 2 | |
m = read(fileM) | |
for (i in 1:numRowsToPrint) { | |
for (j in 1:numColsToPrint) { | |
print('[' + i + ',' + j + ']:' + as.scalar(m[i,j])) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment