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.massert(get == now)
My solution is:
classdef me methods function tf = eq(obj,~) tf = true; end endend
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