check2.m
来自「Robotics TOOLBOX The Toolbox provides m」· M 代码 · 共 24 行
M
24 行
%CHECK2 script to compare M-file and MEX-file versions of RNEfunction check2(robot, n, args) robot = nofriction(robot, 'coulomb'); % create random points in state space q = rand(n, 6); qd = rand(n, 6); qdd = rand(n, 6); % test M-file tic; tau = rne(robot, q, qd, qdd, args{:}); t = toc; % test MEX-file tic; tau_f = frne(robot, q, qd, qdd, args{:}); t_f = toc; % print comparative results fprintf('Speedup is %10.0f, worst case error is %f\n', ... t/t_f, max(max(abs(tau-tau_f))));
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?