Home > Objects > @iData > setalias.m



[s,...] = setalias(s, AliasName, AliasLink, {AliasLabel}) : set iData aliases


function this = setalias(this,names,links,labels)


 [s,...] = setalias(s, AliasName, AliasLink, {AliasLabel}) : set iData aliases

   @iData/setalias function to set iData aliases.
   The function works also when AliasName, AliasLink, and optional AliasLabel
     are given as cell strings. The AliasLink may be of any class, but char is
     interpreted as a link to search in the object or an external file, such
     as '#Data' 'Data' (local links), 'file://path' (full file structure)
     or 'file://path#Data' (a part of an external file).
   The special name 'this' may be used in the Alias link to refer the object itself.
   When the link is empty, the alias is removed, so that
     setalias(s, alias)       deletes an alias, similarly to rmalias
     setalias(s, getalias(s)) deletes all alias definitions.
   The command setalias(iData,'Signal') sets the Signal to the biggest numerical field.
   The input iData object is updated if no output argument is specified.
   An new field/alias may be defined with the quick syntax 's.alias = value'.

 input:  s: object or array (iData)
         AliasName: Name of existing or new alias (char/cellstr)
         AliasLink: definition of the alias, or '' to remove the alias (cell of char/double/...)
         AliasLabel: optional description/label of the alias (char/cellstr)
 output: s: array (iData)
 ex:     setalias(iData,'Temperature','Data.Temperature','This is the temperature')
         setalias(iData,'T_pi','[ this.Data.Temperature pi ]')

 Version: Mar. 22, 2017
 See also iData, iData/getalias, iData/get, iData/set, iData/rmalias


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