Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
taylormcd committed Nov 23, 2021
1 parent 8e309c1 commit 464920e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions examples/exn_thrower.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
function exn_thrower()

error('I take exception to everything.');

end

2 changes: 0 additions & 2 deletions examples/matlab_exception.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion examples/performance.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)))',...
Expand Down

0 comments on commit 464920e

Please sign in to comment.