phrase2word.m

Version 1.0.0.0 (1000 Bytes) by Stefan Billig
String separation - useful for ASCII data header lines

1.3K Downloads

Updated 4 Jan 2005

No License

%-------------------------------------------------------------
% out=phrase2word(phrase, <delimiter,token>) | Version 1.1
%-------------------------------------------------------------
% Cuts input phrase separated by delimiter into words.
% Consecutive delimiters are recognized and the "missing"
% words inbetween are marked by default with a whitespace.
% Useful to extract data labels from a csv-header line.
%-------------------------------------------------------------
% Example:
% words = phrase2word('time,data')
%
% results in {'time','data'}
% By default, ',' is chosen as delimiter, thus
%
% words = phrase2word('time,data',',')
%
% has the same result.
%
% words = phrase2word('time,,data',',','*')
%
% gives {'time' '*' 'data'} with "*" marking empty word.
%-------------------------------------------------------------
% Start: 2003-08-11, S. Billig | Last Change: 2004-11-30, SB
%-------------------------------------------------------------
% has the same result as above.

Cite As

Stefan Billig (2023). phrase2word.m (https://www.mathworks.com/matlabcentral/fileexchange/6575-phrase2word-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Ver. 1.1 gives more flexibility for replacing missing words.
Bugfix for several occurrences of the same word in the phrase...