找回密码
 注册
Simdroid-非首页
查看: 454|回复: 6

【原创】How to put your ICON and caculated results into MsgBox

[复制链接]
发表于 2003-5-3 13:06:03 | 显示全部楼层 |阅读模式 来自 上海浦东新区
前面看到几位网友说询问如何在msgbox中,显示后台的运算结果,我这里编制了一个小程序,给大家一些思路;同时还告诉大家如何在msgbox中定制自己的个性ICON:D8D:^):X,当然这要看个人的爱好了。
源代码很简单,我就不解释了,注意要把你的图片放在matlab的工作目录下,或者自己指定具体的目录。
:D

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2003-5-3 13:07:05 | 显示全部楼层 来自 上海浦东新区

回复: 【原创】How to put your ICON and caculated results into MsgBox

Simdroid开发平台
源代码:(注意:第十一行和第十二行应该是同一行)
  
%% 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

查看全部评分

发表于 2003-5-3 17:13:54 | 显示全部楼层 来自 重庆大学

回复: 【原创】How to put your ICON and caculated results into MsgBox

         谢谢大米兄的原创!!!
  
         确实帮了我大忙!谢谢
ballet 该用户已被删除
发表于 2003-6-7 22:11:50 | 显示全部楼层 来自 北京邮电大学
提示: 作者被禁止或删除 内容自动屏蔽
蓝白725 该用户已被删除
发表于 2003-8-26 22:15:07 | 显示全部楼层 来自 LAN
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2004-11-19 15:40:40 | 显示全部楼层 来自 北京东城

Re:回复: 【原创】How to put your ICON and caculated results into MsgBox

能不能把icon放在窗口icon的位置呢?就是把matlab的图标替换掉?
发表于 2004-11-19 18:40:10 | 显示全部楼层 来自 浙江杭州

Re:【原创】How to put your ICON and caculated results into MsgBox

可以的
以前有帖子讨论过
http://www.simwe.com/forum/viewthread.php?tid=317440
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-6-6 17:58 , Processed in 0.040755 second(s), 16 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表