- 积分
- 37
- 注册时间
- 2002-9-11
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2003-5-3 13:07:05
|
显示全部楼层
来自 上海浦东新区
回复: 【原创】How to put your ICON and caculated results into MsgBox
源代码:(注意:第十一行和第十二行应该是同一行)
%% For www.SIMWE.com MatLab forum <by Bigrice>
%% *******************************************************
%% How to put your ICON and caculated results into MsgBox
%% *******************************************************
data1 = sin(2*pi*.0132)-40; % the value of A
data2 = sum(1:100); % the value of B
[x, maps] = imread('my.gif'); % x is the figure data and maps is the colormap
title = 'Enjoy the program'; % the title of the MsgBox
% below is the result to display
str1 = sprintf('################################### \n The result: A = %f and B = %d \n###################################', data1, data2);
disp('press any key to continue');
pause % wait for a key press
msgbox(str1, title, 'custom', x, maps, 'modal');
clear data*; |
评分
-
1
查看全部评分
-
|