Home > Objects > @iData > getaxis.m

iFit/getaxis

PURPOSE ^

[val, lab] = getaxis(s, AxisIndex) : get iData axis value and label

SYNOPSIS ^

function [val, lab] = getaxis(s,ax)

DESCRIPTION ^

 [val, lab] = getaxis(s, AxisIndex) : get iData axis value and label
 [val, lab] = getaxis(s, 'AxisName|AxisIndex'): get iData axis definition and label

   @iData/getaxis function to get iData axis value, definition and alias.
   An axis is an alias associated with an index/rank.
   when the axis input parameter is given as an index (integer), 
     the value of the axis is returned.
   when the axis input parameter is given as a string/name (e.g. '1' or 'x') 
     the corresponding axis definition is returned.

   The Signal/Monitor corresponds to axis rank 0, and can also be accessed with
     getaxis(a, 'Signal') and a{0}.
   The Error/Monitor can also be accessed with getaxis(a, 'Error').

   Axis 1 is often labelled as 'y' (rows, vertical), 2 as 'x' (columns, horizontal).
   The special syntax s{0} gets the signal/monitor only (same as double(s)), 
     and s{n} gets the axis of rank n.

 input:  s: object or array (iData)
         AxisIndex: axis index to inquire in object, 
           or [] to obtain all axis values 
           or '' to obtain all axis definitions (integer).
         AxisName: axis name to inquire in object, or '' (char). The name may
                   also be specified as 'n' where n is the axis index, e.g. '1'
 output: val: axis value, or corresponding axis name  (double/char)
         lab: axis label (char)
 ex:     getaxis(iData,1), getaxis(iData,'1'), getaxis(s, 'y')

 Version: Nov. 27, 2018
 See also iData, iData/set, iData/get, iData/getalias

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 27-Nov-2018 10:56:24 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1