Putting a variable string into a comma delimited string
Show older comments
Hi,
I am trying to insert an array of numbers and strings into a sql table. I have gotten it to work by using triple quotes around the string I want, but I want this string to be defined by a variable rather than fixed. I am trying to get this output from strjoin :
'285026, 'TC 02 13', 17.3, 17.1, 16.0, 18.0, 16.0, 18.0, 12, 13, 0.07, 0.03'
My code is as follows:
TCListBox=[TCListG1; TCListG2; TCListG3; TCListG4];
TC = TCListBox{i};
Inserted = [test_no, TC, frz, melt, freezelowpass, freezehighpass, meltlowpass, melthighpass,...
npfrz, npmelt, frzslope, meltslope];
strjoin(Inserted, ', ')
Where TCListGn are cell arrays of strings and all the other variables besides TC are numbers.
I am using R2015a.
Accepted Answer
More Answers (0)
Categories
Find more on Cell 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!