From: pietro on 15 Feb 2010 16:01 I have a string that contains a numerical matrix, in which between two rows there are a delimiter and between tow columns there are another delimiter. Is it possible to convert that matrix in numerical matrix giving the delimiter between rows and columns?
From: Walter Roberson on 15 Feb 2010 16:46 pietro wrote: > I have a string that contains a numerical matrix, in which between two > rows there are a delimiter and between tow columns there are another > delimiter. Is it possible to convert that matrix in numerical matrix > giving the delimiter between rows and columns? >> str2num('[1,2;3,4]') ans = 1 2 3 4 The rest is just string manipulation to replace your existing delimiters into commas and semi-colons. And possibly a transpose() if the string is in column-major order instead of row-major order.
|
Pages: 1 Prev: Working with more decimals while using fzero Next: image enhancement |