Show value of an array in a messagebox
10 views (last 30 days)
TastyPastry on 29 Oct 2015
msgbox() doesn't give you a lot of options with the formatting. If you want to move the text to the right, you can add an icon.
Otherwise, you're better off creating your own figure and putting UI elements into it. For example, if you were to create a small figure and put the value and an OK button:
fig = figure('position',[350 350 150 150]);
data = uicontrol('style','text','units','normalized','string',num2str(myData),...
'horizontalalignment','center','position',[.4 .2 .6 .2]);
button = uicontrol('style','pushbutton','units',normalized','string','OK','position',[.4 .1 .2 .1]);
Then, you can just set the button callback to close the figure or something.