![]() |
![]() |
|
PLS_Toolbox Documentation: encode | < ellps | encodexml > |
encode
Purpose
Translates a variable into matlab-executable code.
Synopsis
str = encode(item,varname)
str = encode(item,varname,options)
Description
The created code can be eval'd or included in an m-file to reproduce the variable. This is essentially an inverse function of "eval" for variables.
Input is a variable (item) and an optional name for that variable (varname). If (varname) is omitted, the input variable name will be used. If varname is empty, leading code which does assignment is omitted.
Output is a string (str) which can be inserted into an m-file or passed to eval for execution.
Options
Example
Create code to reproduce a preprocessing structure
>> p = preprocess('default','meancenter');
>> encode(p)
See Also
encodexml, parsexml
< ellps | encodexml > |