How can a MATLAB GUIDE control be used to display the contents of a text file in a GUI? The text file may be very long or very wide so it should have the ability to have ver
Here is my solution. Good Luck
fid = fopen(filename);
str = textscan(fid, '%s', 'Delimiter','\n'); str = str{1};
fclose(fid);
f=figure;
hPan = uipanel(f,'Units','normalized');
uicontrol(hPan, 'Style','listbox', ...
'HorizontalAlignment','left', ...
'Units','normalized', 'Position',[0 0 1 1], ...
'String',str);