help-octave
[Top][All Lists]
Advanced

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

variable.(key) what is?


From: shivax
Subject: variable.(key) what is?
Date: Thu, 19 Dec 2019 13:21:03 -0600 (CST)

hi, i see in example code the .()  after variable 

Example:

function v = mod09_05_state(key, val)
  persistent state;
  if (nargin == 0)  
    % Return the entire struct
     printf("0 \n" );
    v = state;
  elseif (nargin == 1)
    % Return a particular field from the struct
    printf("1 \n" );
    v = state.(key);
  elseif (nargin == 2)
      printf("2 \n" );
    % Set a key value (key must be a string)
    state.(key) = val;
    v = val;
  end
end

what is  .(key)? i dont find in help octave variable



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



reply via email to

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