马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
<STRONG>楼主 </STRONG> <br>
<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TR>
<TD width="100%">用MATLAB做一个界面 通过编辑框输入不同的数据改变总轴长以及单位长度并且坐标轴被划分为不同大小的网格 以下程序怎么改啊 这个程序输入轴长和刻度后不能在图形上正确显现 帮帮忙啊<br>%jiemian.m<br>global ctsl; %测区总长<br>global ctsw; %测区总宽<br>global ctml; %网格长度<br>global ctmw; %网格宽度<br>global V0; %初始速度<br>global Vmax; %最大速度<br>global iterN; %迭代次数<br>global ctu; %修正量系数<br>global wmeshnum;%宽度上网格个数<br>global lmeshnum;%长度上网格个数<br>global ctmeshnum;%网格总个数<br>global ctraynum;%射线条数<br>global ctmeshv;%网格速度<br>global AnalogV;%模拟波速<br>global cv_v; %波速离差<br>global cv_t; %走时离差<br>global v_baddis; %波速最坏情况距离<br>global t_baddis; %走时最坏情况距离<br>global ctbptv;%<br>global meshbugprobability; %单元格为缺陷的概率<br>global ultrasonictime; % 声时文件<br>global vpop;<br>global h_axes;<br>global h_fig;<br>%--------------------------------------------------------------------------------------------------------------------------<br>%生成图形界面<br>clf reset<br>H=axes('unit','normalized','position',[0,0,1,1],'visible','off');<br>set(gcf,'currentaxes',H);<br>h_fig=get(H,'parent');<br>set(h_fig,'menubar',menubar);<br>set(h_fig,'unit','normalized','position',[0.01 0.2 0.9 0.7]);<br>h_axes=axes('parent',h_fig,'unit','normalized','position',[0.04,0.4,0.5,0.4],...<br> 'fontsize',8);<br>str='CT成象信息输入';<br>set(h_fig,'name',str,'numbertitle','off');<br>xlabel('F面');<br>ylabel('L面');<br>title('B面');<br>str='R面';<br>text(ctsl+1,ctsw/2,str,'fontsize',8);<br>%--------------------------------------------------------------------------------------------------------------------------<br>%创建数据输入编辑框<br>%创建数据输入编辑框<br>h_text1=uicontrol(h_fig,'style','text','unit','normalized','position',...<br> [0.6,0.75,0.06,0.04],'horizontal','left','string','数据输入');<br>h_text2=uicontrol(h_fig,'style','text','unit','normalized','position',...<br> [0.6,0.68,0.06,0.04],'horizontal','left','string','轴总长');<br>h_text3=uicontrol(h_fig,'style','text','unit','normalized','position',...<br> [0.6,0.58,0.06,0.04],'horizontal','left','string','轴总宽');<br>h_text4=uicontrol(h_fig,'style','text','unit','normalized','position',...<br> [0.6,0.48,0.06,0.04],'horizontal','left','string','单位长度');<br>h_text5=uicontrol(h_fig,'style','text','unit','normalized','position',...<br> [0.6,0.38,0.06,0.04],'horizontal','left','string','单位宽度');<br><br>h_edit2=uicontrol(h_fig,'style','edit','unit','normalized','position',...<br> [0.67,0.68,0.10,0.04],'horizontal','left',...<br> 'callback','ctsl=str2num(get(gcbo,''string''))');<br>h_edit3=uicontrol(h_fig,'style','edit','unit','normalized','position',...<br> [0.67,0.58,0.10,0.04],'horizontal','left',...<br> 'callback','ctsw=str2num(get(gcbo,''string''))');<br>h_edit4=uicontrol(h_fig,'style','edit','unit','normalized','position',...<br> [0.67,0.48,0.10,0.04],'horizontal','left',...<br> 'callback','ctml=str2num(get(gcbo,''string''))');<br>h_edit5=uicontrol(h_fig,'style','edit','unit','normalized','position',...<br> [0.67,0.38,0.10,0.04],'horizontal','left',...<br> 'callback','ctmw=str2num(get(gcbo,''string''))');<br>-----------------------------------------------------------------------------------<br><br>%--------------------------------------------------------------------------------------------------------------------<br>%添加控制按钮<br>h_push1=uicontrol(h_fig,'style','push',...<br> 'unit','normalized','position',[0.78,0.20,0.07,0.05],...<br> 'string','确定','callback',['axis([0 ctsl 0 ctsw]);','grid on']);<br>h_push2=uicontrol(h_fig,'style','push',...<br> 'unit','normalized','position',[0.90,0.20,0.07,0.05],...<br> 'string','退出','callback','close');<br>--------------------------------------------------<br><br><br><br><br></TD></TR></TABLE>
[此贴子已经被作者于2006-5-26 14:36:54编辑过]
|