Skip to content

Instantly share code, notes, and snippets.

View immutable_read_as_array_fail.jl
# init file with test data: bytes of 0, 1, 2, ..
fn = "tmp.dat"
open(fn, "w") do s
write(s, UInt8[i-1 for i in 1:256])
# define an immutable type and a read
immutable A
twadleigh / mexjulia.c
Last active Aug 29, 2015
Julia as a matlab mex function
View mexjulia.c
#include <julia.h>
#include <mex.h>
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
jl_function_t *mex_main;
jl_value_t *array_type;
jl_array_t *mxout;
jl_array_t *mxin;