how to convert matrix contains numbers to matrix of strings
Show older comments
Dear all,
I in my code I put my results in a matrix and sorted then extract the first fife columns in a new matrix which I want to convert to matrix contains strings, I found that in the command
A=[a,b,d,g,h]
L=regexprep(sprintf('%011.6f',A),'[.\L]','') , I got exactly the strings that i want but not sort
00117416770003913892002348335300007827780000071162
00282348210009411607005646964200018823210000171120
then after I sorted I tried to get the same strings in a matrix, but I got
L1 =
000209800034030390020482350000680608000006873
L1 =
00746770003938920023483353000078277800000762
I don't no why the {1} disappear the string should be exactly as L.
Thanks in advance
Accepted Answer
More Answers (0)
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!