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

listbox

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 3×3 matrix form

Best Answer

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