From 464920eef72c73787f423359c5a7780a04dd9a52 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 23 Nov 2021 08:49:46 -0700 Subject: [PATCH] update examples --- examples/exn_thrower.m | 6 ++++++ examples/matlab_exception.m | 2 -- examples/performance.m | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 examples/exn_thrower.m diff --git a/examples/exn_thrower.m b/examples/exn_thrower.m new file mode 100644 index 0000000..9212a10 --- /dev/null +++ b/examples/exn_thrower.m @@ -0,0 +1,6 @@ +function exn_thrower() + +error('I take exception to everything.'); + +end + diff --git a/examples/matlab_exception.m b/examples/matlab_exception.m index 1df2a82..23edece 100644 --- a/examples/matlab_exception.m +++ b/examples/matlab_exception.m @@ -2,8 +2,6 @@ % MATLAB (with the Julia backtrace appended) function matlab_exception() -exn_thrower = @() error('I take exception to everything.'); - try jl.call('Mex.call_matlab', int32(0), exn_thrower) catch e diff --git a/examples/performance.m b/examples/performance.m index ca9eaf0..9b51daf 100644 --- a/examples/performance.m +++ b/examples/performance.m @@ -30,7 +30,6 @@ function performance() %% mexjulia raw % For maximum performance. This requires dealing with the MEX pointer arrays -jleval('using MATLAB: MxArray, jscalar, mxarray'); jleval(sprintf('%s\n',... 'function divrem_raw(plhs::Vector{Ptr{Cvoid}}, prhs::Vector{Ptr{Cvoid}})',... 'out = divrem(jscalar(MxArray(prhs[1], false)), jscalar(MxArray(prhs[2], false)))',...