Home > Objects > @iData > setaxis.m

iFit/setaxis

PURPOSE ^

s = setaxis(s, rank, alias, value) : set iData axes

SYNOPSIS ^

function this = setaxis(this, rank, alias, value)

DESCRIPTION ^

 s = setaxis(s, rank, alias, value) : set iData axes

   @iData/setaxis function to set iData axes.
     setaxis(object, rank, alias) defines axis of specified rank as the alias.
       The alias name must exist in the object.
     setaxis(object, rank, alias, value) also sets the alias value.
       The alias name must exist in the object, or it is created and assigned to the axis value.
     setaxis(object, rank, value) sets axis value (possibly creates an alias).
     setaxis(object)              tests all axes
     setaxis(object,'Signal')     sets the Signal to the biggest numerical field
   The input iData object is updated if no output argument is specified.
   The Signal/Monitor corresponds to axis rank 0. Setting its value multiplies 
     it by the Monitor and then assigns the Signal.
   Axis 1 is often labelled as 'y' (rows, vertical), 2 as 'x' (columns, horizontal).
   The special syntax a{0} multiplies the value by the Monitor and then assigns 
   the Signal, and a{n} assigns the axis of rank n.
     When the assigned value is a char, the axis definition is set.
       a{rank} = 'x'     is the same as   setaxis(a, rank, 'x')
     When the assigned value is numeric, the axis value is set.
       a{rank} = 1:100   is the same as   setaxis(a, rank, 1:100)

 input:  s: object or array (iData)
         rank: rank of the axis (integer)
         alias: name of an alias/field (char)
         value: value of the axis (char/alias/numeric)
 output: s: array (iData)
 ex:     setaxis(iData, 1, 'Temperature') defines Temperature as the 'y' axis (rank 1)
         a{1} =  'Temperature'            does the same

 Version: Mar. 22, 2017
 See also iData, iData/getaxis, iData/get, iData/set, iData/rmaxis

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 22-Mar-2017 09:13:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1