Newbie keeps getting "invalid call to script" error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie keeps getting "invalid call to script" error

Faraz Hussain
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 | Threaded
Open this post in threaded view
|

Re: Newbie keeps getting "invalid call to script" error

shall689
This post was updated on .
It works for me in version 4.2.1.


>> c = BasicClass
c =




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html