MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]怎么修改所调用的M文件里的参数? (https://www.labfans.com/bbs/showthread.php?t=3655)

xiaolv 2008-06-18 11:02

[求助]怎么修改所调用的M文件里的参数?
 
function guihd7(arg)
if nargin==0
arg='Initialize';
end
switch arg
case 'Initialize'
hf=figure('Position',[200 200 600 400] ,...
'Name','仿真图形显示' ,...
'NumberTitle','off');
ha=axes('Position',[0.4 0.1 0.5 0.7],...
'Box','on');


hbWMStoTMS=uicontrol(hf,...
'Style','pushbutton',...
'Position',[15,100,200,13],...
'String','WMStoTMS',...
'CallBack','WMStoTMS');

hbsp1=uicontrol(hf,...
'Style','edit',...
'Position',[20,45,80,20],...
'String','sp.ACIRnum',...
'CallBack','close');
[COLOR="red"]hbsp.ACIRnum[/COLOR]=uicontrol(hf,...
'Style','popupmenu',...
'Position',[100,45,80,20],...
'String','8|7|6|5|4|3|2',...
[COLOR="red"]'CallBack','WMStoTMS'); [/COLOR] (我觉得这句话和下面这句话可能有问题)
hbsp2=uicontrol(hf,...
'Style','edit',...
'Position',[20,75,80,20],...
'String','sp.circlenum',...
'CallBack','close');
[COLOR="Red"]hbsp.circlenum[/COLOR]=uicontrol(hf,...
'Style','popupmenu',...
'Position',[100,75,80,20],...
'String','1|2|3|4|5|6|7|8|9|10',...
[COLOR="red"]'CallBack','WMStoTMS'); [/COLOR]
hbClose=uicontrol(hf,...
'Style','pushbutton',...
'Position',[110,365,100,20],...
'String','Exit',...
'CallBack','close');

case 'Plot WMStoTMS'
%...


case 'Exit'
%...
otherwise
errordlg('输入参数错误!','错误提示');
end

其中sp.ACIRnum和sp.circlenum是WMStoTMS.m文件中的两个参数,现在希望在界面上能够修改这两个参数的值,并返回到WMStoTMS.m中去,然后运行WMStoTMS.m文件
但是实现不了,高手帮帮忙吧

xiaolv 2008-06-19 12:38

以解决 请删帖


所有时间均为北京时间。现在的时间是 08:27

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.