phrase2word.m
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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | Ver. 1.1 gives more flexibility for replacing missing words.
|