Info
此问题已关闭。 请重新打开它进行编辑或回答。
I have a n*m matrix which all elements strings. I wanna put particular character above on these columns.
1 次查看(过去 30 天)
显示 更早的评论
num1=[1;2;3] %points id
num2=[30.45;32.55;33.85] %latitudes
num3=[40.55;41.22;43.62] %longitudes
num=[num1 num2 num3] %points id, latitude longitude
num=num2str(num)
set(handles.listbox1, 'String', num) %to write into the listbox in the GUI
%I wanna put Point_İd Latitude and Longitude in the first row of this matrix and write this matrix in the listbox.
Point_İd Latitude Longitude
1 30.45 40.55
2 32.55 41.22
3 33.85 43.62 %that's the structure I wanna put in the listbox.
0 个评论
回答(1 个)
Walter Roberson
2013-11-4
num = { 'Point_İd Latitude Longitude'; cellstr(num2str(num)) };
to replace the existing num2str()
Please also remember to switch the listbox to a fixed-width font.
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!