matlab GUI 调用m文件,之后向callback函数返回参数的问题
functionpushbutton1_Callback(hObject,eventdata,handles)functionchannel_capglobalC;glo...
function pushbutton1_Callback(hObject, eventdata, handles)
function channel_cap
global C;
global n;
C=0;
n=0;
str1=get(handles.edit1,'string');
str2=get(handles.edit2,'string');
num1=str2num(str1);
num2=str2num(str2);
[C,n]=channel_cap(num1,num2);
set(handles.edit3,'string',num2str(C));
set(handles.edit4,'string',num2str(n)); 展开
function channel_cap
global C;
global n;
C=0;
n=0;
str1=get(handles.edit1,'string');
str2=get(handles.edit2,'string');
num1=str2num(str1);
num2=str2num(str2);
[C,n]=channel_cap(num1,num2);
set(handles.edit3,'string',num2str(C));
set(handles.edit4,'string',num2str(n)); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询