##Rotate a square matrix 90 degrees clockwise.
rot90 <- function(a) {
n <- dim(a)[1]
stopifnot(n==dim(a)[2])
t(a[n:1, ])
}
JavaScript:
Fill in a default value for every blank text field
Hello.
Matlab: Write numbers to a file:
f = fopen('test.txt', 'w');(I'm sure there's a better way to do this.)
fprintf(f, '%g\n', 1:50);
fclose(f);
No comments:
Post a Comment