Documentation of fieldnames_parts
Global Index (all files) (short | long)
| Local contents
| Local Index (files in subdir) (short | long)
Function Synopsis
[FieldNameParts] = fieldnames_parts(FieldNameFull)
Help text
Decompose long/full fieldnames into their parts
This function decomposes the full structure fieldname into its parts.
The partial strings are returned in a cell array.
Syntax: [FieldNameParts] = fieldnames_parts(FieldNameFull)
Input parameters:
FieldNameFull - String containing one full structure fieldname
(mostly created by fieldnames_full)
Output parameter:
FieldNameParts - cell array of strings containing the parts of the full
structure fieldnames
Example:
% Get the partial field names from the full fieldname
>> FieldNameParts = fieldnames_parts('SecondField.Deeper.Really')
>> FieldNameParts =
'SecondField' 'Deeper' 'Really'
See also: paraoptset, paraoptsave, paraoptload, fieldnames_full
Cross-Reference Information
|
This function is called by |
|
|
Listing of function fieldnames_parts
% Author: Hartmut Pohlheim
% History: 17.02.2002 file created (taken from compdiv)
function [FieldNameParts] = fieldnames_parts(FieldNameFull)
% Preset output parameter
FieldNameParts = {};
NameRest = FieldNameFull;
% Take all parts before '.', one after the other
while ~(isempty(NameRest)),
[Part, NameRest] = strtok(NameRest, '.');
FieldNameParts = {FieldNameParts{:}, Part};
end
% End of function
This document is part of
version 3.7 of the
GEATbx: Genetic and Evolutionary Algorithm Toolbox for use with Matlab -
www.geatbx.com.
The Genetic and Evolutionary Algorithm Toolbox is
not public domain.
© 1994-2005 Hartmut Pohlheim, All Rights Reserved,
(support@geatbx.com).