Split delimiter separated strings into a matrix

version (2.05 KB) by Gie Spaepen
Function to split a delimiter separated string into a matrix of doubles.


Updated 16 Mar 2004

View License

Function: outmatrix = strsplit(inpstr[,delimiter])

inpstring, this is the input string which is a delimiter separated string: 345.56,376.5,4334.34 .
delimiter, optional if not given, ',' is taken.
outmatrix: if all values in inputstring are numerical a double array is given otherwise a cell array.

Cite As

Gie Spaepen (2022). Split delimiter separated strings into a matrix (https://www.mathworks.com/matlabcentral/fileexchange/4615-split-delimiter-separated-strings-into-a-matrix), MATLAB Central File Exchange. Retrieved .

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

Inspired: rsplit, latexfigure

Community Treasure Hunt

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

Start Hunting!