From b602a0ce3526c0d5f5fd6c681d6a70101a492d89 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 16 May 2014 01:44:16 -0400 Subject: hw01 assignment and julia notes --- julia/misc.jl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 julia/misc.jl (limited to 'julia') diff --git a/julia/misc.jl b/julia/misc.jl new file mode 100644 index 0000000..5d98e0b --- /dev/null +++ b/julia/misc.jl @@ -0,0 +1,27 @@ +### Julia image manipulation + +Pkg.update() +Pkg.add("Images") +Pkg.add("ImageView") + +using ImageView, Images +img = imread("my_photo.jpg") +# eg, rotate via a matrix transform +img.data = img.data' +display(img, pixelspacing = [1,1]) + +### Julia .mat loating + +Pkg.update() +Pkg.add("MAT") +using MAT +file = matopen("matfile.mat") +read(file, "varname") +close(file) + +file = matopen("matfile.mat", "w") +write(file, "varname", variable) +close(file) + +vars = matread("matfile.mat") + -- cgit v1.2.3