Home > Objects > @iData > setalias.m

iFit/setalias

PURPOSE ^

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

SYNOPSIS ^

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

DESCRIPTION ^

 [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,'Temperature','this.Data.Temperature')
         setalias(iData,'Temperature',1:20)
         setalias(iData,'T_pi','[ this.Data.Temperature pi ]')

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

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