I created a simple file called BasicClass.m but when I run from the command prompt, I get:
octave:3> a=BasicClass
error: invalid call to script /home/hussaif1/octave/BasicClass.m
The BasicClass.m file is in the same folder as where I launch octave. It contains this code:
classdef BasicClass
properties
Value
end
methods
function r = roundOff(obj)
r = round([obj.Value],2);
end
function r = multiplyBy(obj,n)
r = [obj.Value] * n;
end
end
end