Undefined function or variable 'Link'. Error in Robotics>btn_Forward_Callback (line 158) L(1) = Link([0 L_1 0 pi/2]); Error in gui_mainfcn (line 95) feval(varargin{:}); Error in Robotics (line 42) gui_mainfcn(gui_State, varargin{:});
이전 댓글 표시
% --- Executes on button press in btn_Forward.
function btn_Forward_Callback(hObject, eventdata, handles)
% hObject handle to btn_Forward (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Th_1 = str2double(handles.Theta_1.String)*pi/180;
Th_2 = str2double(handles.Theta_2.String)*pi/180;
Th_3 = str2double(handles.Theta_3.String)*pi/180;
L_1 = 20;
L_2 = 50;
L_3 = 40;
L(1) = Link([0 L_1 0 pi/2]);
L(2) = Link([0 0 L_2 0]);
L(3) = Link([0 0 L_3 0]);
Robot = SerialLink(L);
Robot.name = 'Robot';
Robot.plot([Th_1 Th_2 Th_3]);
T = Robot.fkine([Th_1 Th_2 Th_3]);
handles.Pos_X.String = num2str(floor(T(1,4)));
handles.Pos_Y.String = num2str(floor(T(2,4)));
handles.Pos_Z.String = num2str(floor(T(3,4)));
댓글 수: 1
Geoff Hayes
2018년 2월 11일
Ken - what is Link? I'm guessing it is a function of some kind where you input an array of four elements, but it is unclear what the output will be. (Or how even L is used after that.) Is Link a custom function that can be found within the MATLAB search path?
답변 (2개)
dulith chinthaka
2018년 3월 8일
편집: dulith chinthaka
2018년 3월 8일
1 개 추천
you need to download robotic Toolbox library that is the reason for this error.
Nabil12347
2019년 4월 1일
0 개 추천
hello please help me i downloaded toolbox on the site petercorke i run it normal but the problem the function Link () does not run with MATLAB that i have 2017 however that toolbox i have download is 2015 answer me as soon as possible
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!