How can I store number and string in the same cell in UITable?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad Farooq Zia
am 9 Aug. 2018
Kommentiert: Muhammad Farooq Zia
am 9 Aug. 2018
I am trying to store a value in a cell that is something like Sw=0.256, but 'SW=' part is a string while '0.256' is a computed value. Both of these parts have to go in the same cell. Is there a way to do that?
0 Kommentare
Akzeptierte Antwort
jonas
am 9 Aug. 2018
Not if you want the number stored as a double. See this recent thread:
You can of course calculate the number and then store it as a string.
X=0.256;
sprintf('Sw=%g',X)
ans =
'Sw=0.256'
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!