Home > Libraries > Loaders > str2struct.m

iFit/str2struct

PURPOSE ^

s=str2struct(string) Create a structure from string lines

SYNOPSIS ^

function s=str2struct(string)

DESCRIPTION ^

 s=str2struct(string) Create a structure from string lines
   This function creates a structure from string containing <name> <value> pairs
   Structure member must be separated by ';' or end-of-lines.
   The member assignation can be specified with spaces, '=' and ':'
   Values of type string can be specified with ' and " delimiters.

 input arguments:
   string: string from which the structure should be extracted. It can
           also be a file name, which is then read.

 output variables:
   s: structure which contains the named values

 example: str=str2struct('Temperature: 200; RV=3; comment something nice; a="blah"');
          
 See also: mat2str, num2str, eval, sprintf, class2str

 Part of: Loaders utilities (ILL library)
 Author:  E. Farhi <farhi@ill.fr>. Nov. 27, 2018
 (c) E.Farhi, ILL. License: BSD.

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