In GUI, how I can assign any matrix to listbox as a matrix form?

for example, a=[1 2 3;4 5 6;7 8 9] is a matrix.
I wanna put this matrix into the listbox as a 3x3 matrix form

2 Kommentare

Jan
Jan am 15 Mai 2013
Bearbeitet: Jan am 15 Mai 2013
What is a "3x3 matrix form" exactly? Even if you use the standard formatting e.g. by evalc(disp(a)), the proportional font in the listbox might change the column orientation. The using a monospaced font in the uicontrol is required also.
How many listbox entries are to be constructed from this? Is it intended that the matrix all go into a single entry?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

a=[1 2 3;4 5 6;7 8 9]
set(handles.listbox1,'String',num2str(a))

Weitere Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by