请教各位:帮我看看问题出在哪?
<P>我定义一个按钮,CALLBACK回调函数为pushapply(),具体代码如下:<BR>function open()<BR>global FileName;<BR>=uigetfile(...<BR>{'*.bmp;*.jpg;*.tif;*.png','IMAGE Files (*.bmp,*.jpg,*.tif,*.png)';<BR> '*.bmp','Bitmap (*.bmp)'; ...<BR> '*.jpg','Joint Photographic Experts Group (*.jpg)'; ...<BR> '*.tif','Tagged Image files (*.tif)'; ...<BR> '*.png','Portable Network Graphics (*.png)'; ...<BR> '*.*','All Files (*.*)'},...<BR> 'file Selector','')<BR><BR> h_axes=axes('position',,'visible','on'); <BR> imshow(FileName)<BR><BR>h1 = uicontrol(gcf, ... <BR>'style','pushbutton',...<BR>'Callback',['pushapply(FileName)'], ... <BR>'Position',, ... <BR>'String','Apply', ... <BR>'Tag','Pushapply'); <BR><BR>函数pushapply如下:<BR><BR>function pushapply(FileName)<BR><BR>x1=imread(FileName);<BR>figure,imshow(x1)<BR><BR>运行时出现下面的错误:<BR><BR>??? Undefined function or variable 'FileName'.</P><P>??? Error while evaluating uicontrol Callback.<BR><BR>请大家帮我看看这是怎么回事,谢谢了!<BR></P>
回复:(dxwwangyan)请教各位:帮我看看问题出在哪?...
我这里运行没问题啊<BR><BR>是两个m文件吗?是都在工作目录下吗? <P>是两个M文件,都在工作目录下。那是怎么回事啊</P>哈哈
顶拉回复:(dxwwangyan)是两个M文件,都在工作目录下。那...
<DIV class=quote><B>以下是引用<I>dxwwangyan</I>在2006-3-30 19:44:54的发言:</B><BR><P>是两个M文件,都在工作目录下。那是怎么回事啊</P></DIV>
<br>那真是奇怪了,没碰到过
页:
[1]