📄 scm_menu3.m
字号:
%SCM_MENU3 Auxiliary: Demonstration of the SCM Method (D&H Parameters)
%July ~ December 2005, by Reinaldo M. do Nascimento
%clc
xTitle='D&H Parameters ==> MDH=scm2dh(manipulator)';
xCommand='Modified';
while 1
selec5 = menu(xTitle,...
xCommand,...
'Exit');
switch selec5
case 1
switch xCommand
case 'Modified'
switch exist('MDH')
case 0
MDH=scm2dh(manipulator)
case 1
MDH
end
if exist('SDH')
xTitle='D&H Parameters ==> verify again';
else
xTitle='D&H Parameters ==> SDH=dhconv(MDH) or SDH=dhconv(MDH,''m2s'')';
end
xCommand='Standard';
case 'Standard'
switch exist('SDH')
case 0
SDH=dhconv(MDH,'m2s')
case 1
SDH
end
xTitle='D&H Parameters';
xCommand='Miscellaneous';
case 'Miscellaneous'
xTitle='Miscellaneous';
xCommand='Homogeneous Transformation';
case 'Homogeneous Transformation'
while 1
selec6 = menu('Homogeneous Transformation',...
'MH=dhconv(MDH,''m2h'')',...
'SH=dhconv(SDH,''s2h'')',...
'Exit');
switch selec6
case 1
switch exist('MH')
case 0
MH=dhconv(MDH,'m2h')
case 1
MH
end
case 2
switch exist('SH')
case 0
SH=dhconv(SDH,'s2h')
case 1
SH
end
case 3
xTitle='Miscellaneous';
xCommand='Jacobian Matrix';
break
end
end
case 'Jacobian Matrix'
while 1
selec6 = menu('Jacobian Matrix',...
'J0=h2j(MH,manipulator)',...
'Jn=h2j(MH,manipulator,''n'')',...
'Exit');
switch selec6
case 1
switch exist('MH')
case 0
MH=dhconv(MDH,'m2h')
disp('J0=simplify(h2j(MH,manipulator))')
J0=simplify(h2j(MH,manipulator))
case 1
disp('J0=simplify(h2j(MH,manipulator))')
J0=simplify(h2j(MH,manipulator))
end
case 2
switch exist('MH')
case 0
MH=dhconv(MDH,'m2h')
disp('Jn=simplify(h2j(MH,manipulator,''n''))')
Jn=simplify(h2j(MH,manipulator,'n'))
case 1
disp('Jn=simplify(h2j(MH,manipulator,''n''))')
Jn=simplify(h2j(MH,manipulator,'n'))
end
case 3
xTitle='D&H Parameters ==> verify again';
xCommand='Modified';
break
end
end
end
case 2
break
end
end
clear selec5 selec6 x*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -