summaryrefslogtreecommitdiffstats
path: root/julia
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2014-05-16 01:44:16 -0400
committerbnewbold <bnewbold@robocracy.org>2014-05-16 01:44:16 -0400
commitb602a0ce3526c0d5f5fd6c681d6a70101a492d89 (patch)
tree72b08b798a8edf8eef7b61433dedf8c1a650368c /julia
parent7624d4ded7ee62cc1c08b42b65ecdfbf0bce0cc3 (diff)
downloaddmmsb2014-b602a0ce3526c0d5f5fd6c681d6a70101a492d89.tar.gz
dmmsb2014-b602a0ce3526c0d5f5fd6c681d6a70101a492d89.zip
hw01 assignment and julia notes
Diffstat (limited to 'julia')
-rw-r--r--julia/misc.jl27
1 files changed, 27 insertions, 0 deletions
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")
+