Home > brede > brede_struct_field2nums.m

brede_struct_field2nums

PURPOSE ^

brede_struct_field2nums - Convert field to number

SYNOPSIS ^

function num = brede_struct_field2nums(f)

DESCRIPTION ^

 brede_struct_field2nums - Convert field to number

       n = brede_struct_field2nums(f)

       Input:  f   Field 
 
       Output: n   Numbers

       Convert a field that might be a cell string, string or number
       to numbers. 

       Example:
         % A string with multiple numbers
         brede_struct_field2nums('2 2')

         % Numbers on multiple lines in an ordinary string
         brede_struct_field2nums(sprintf(' 1 2.3\n 2 5.6\n 3 '))

         % Numbers on multiple lines in a cellstring
         brede_struct_field2nums(cellstr(sprintf(' 1 2.3\n 2 5.6\n 3 ')))

         % Numbers on multiple lines in multiple cellstrings
         brede_struct_field2nums({ '42' '100 101' sprintf(' 1 2.3\n 2 5.6\n 3 ')})

       See also BREDE, BREDE_STRUCT_FIELD2CELLSTR,
                BREDE_STRUCT_FIELD2NUM.

 $Id: brede_struct_field2nums.m,v 1.2 2005/10/05 13:16:04 fnielsen Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005