how to combine 2 columns together?
Show older comments
I would like to combine 2 columns together with a , in between the columns. for example column 1 has 0% and column 2 has 1.0 and the final result should be 0%,1.0.
Accepted Answer
More Answers (1)
dpb
on 12 Feb 2014
You'll have to do this w/ a specific format...
>> fprintf('%d%%,%.1f\n',x')
0%,1.0
>>
While I used a 2-element vector, NB that you'll have to transpose an array to write in row-major order for output.
Categories
Find more on Matrices and Arrays 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!