【发布时间】:2012-11-09 10:47:58
【问题描述】:
我是 matlab 新手,我试图在 matlab GUI 中调用一个函数,但我一直收到错误消息。你能帮忙吗?
function PushMe_Callback(hObject, eventdata, handles)
set(handles.output_line,'String','I Got here');
Get_Length(Note_Vector,output,Counter,Total_num)
%------------------------------------------------------------
function Get_Length(Note_Vector,output,Counter,Total_num)
output = [ ];
while (1)
T = Total_num - Counter;
for j=1:T
[xml_input]=Get_Note(Note_Vector(j));
output = [output xml_input];
end
end
【问题讨论】:
-
错误信息是什么?您的代码在哪一行崩溃?
-
它返回“未定义变量”然后列出第一个变量 Note_Vector
-
返回错误信息:- 未定义的函数或变量'Note_Vector'。 AMNR 中的错误>PushMe_Callback(第 414 行)Get_Length(Note_Vector,output,Counter,Total_num)
-
然后你应该定义变量
Note_Vector。 -
在main函数中定义,这里是代码 %main function Note_Vector = [ ];输出 = [ ];计数器 = 0; while (1) for i=1:Total_num % % % Note_Vector = [Note_Vector Note+Shift];结束结束
标签: call matlab-guide