MATLAB: Doesn’t Cody accept a class definition

codyobject-orientedoop

I created a solution for Cody Problem 1745 (Get me!) that is very simple and works perfectly on my computer; but in Cody, it results in the error:
Error: Undefined function or variable 'me'.
The test code is:
get = me();
y = rand(1,12345);
!rm now.m
!rm assert.m
assert(get == now)
My solution is:
classdef me
methods
function tf = eq(obj,~)
tf = true;
end
end
end
Why doesn't Cody accept this?
(P. S.) And why doesn't it accept function definitions like
function justDoIt
(which are appropriate for some problems and accepted by MATLAB) but requires at least one input and output?

Best Answer

I believe cody does some checks on the solution before writing it to a file. It also won't accept a function definition without a return value.
Most likely, it won't write the solution if it doesn't start with
function something = another