How do I convert symbolic values to numerical for uitable ?
Ältere Kommentare anzeigen
How do I Convert symbolic values to numerical for uitable ? The table itself, tbl displays fine, but I want to display the same data into a uitable. The last column is symbolic
load datafile.mat
format bank
tbl = table(t',h', round(vpa(v),2)', 'VariableNames',["Time(s)", "Height(ft)","Velocity(ft/s)"])
fig = uifigure;
uit = uitable(fig,"Data",tbl)
3 Kommentare
Note that
A = round(vpa(0.000012345),2); disp(char(A))
does not end in 0.00 . The default output for class sym supresses trailing zeros, same as the default output for format short or long
In order to get trailing zeros in uitable() you need to set the ColumnFormat property to 'bank' -- or create the columns as character vectors or strings.
Doug Leaffer
am 3 Dez. 2024
Walter Roberson
am 3 Dez. 2024
uit = uitable(fig, "Data", tbl, "ColumnFormat", "bank")
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Large Files and Big Data finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!