MATLAB: How to display a matrix in a static text

salam, i'm working on a GUI project in matlab and i have 16 variables which are entered by edittexts and i need to display them as a matrix 4*4 in a static text but it's always showing a line . i don't know what's the problem !!!

Best Answer

text_to_display = cellstr(num2str(Your4x4Array));
set(handles.edit1, 'String', text_to_display, 'Max', 2, 'FontName', 'courier')
The Max must be greater than 1 in order to display multiple lines of text.
The FontName should be set to one of the non-proportional fonts or else the numbers will not line up properly.