My system : Windows 10 (version 2004)** or Ubuntu 20.04
- Octave version: 6.2.0
- Installation method: Downloaded and installed “octave-6.1.0-w64-installer.exe” from https://www.octave.org/download.html
I am a novice on Octave and I apologize for the question (I am not be able to find an answer):
I would create a class with a static method that can be called directly or by an object instance.
Below a nutshell sample:
classdef obj properties X = 70; end methods function p = obj (a) end end methods (Static = true) function p = fGen (a) X a end end end
here what happens:
>> o = obj; ... >> o.fGen("Try") error: 'X' undefined near line 11, column 11 ... >> obj.fGen("Try") error: 'X' undefined near line 11, column 11 ...