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

Jan
Jan 2013년 5월 15일
편집: Jan 2013년 5월 15일
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?

댓글을 달려면 로그인하십시오.

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 5월 15일
a=[1 2 3;4 5 6;7 8 9]
set(handles.listbox1,'String',num2str(a))

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by