help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie keeps getting "invalid call to script" error


From: Info
Subject: Newbie keeps getting "invalid call to script" error
Date: Tue, 16 Oct 2018 14:01:19 +0000 (UTC)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]