已认证网站服务费怎么做网页托管平台
web/
2025/10/5 19:49:21/
文章来源:
已认证网站服务费怎么做,网页托管平台,绍兴做企业网站的公司,敬老院网站建设方案来源
计算机器人 transformation matrix 相关内容时#xff0c;对于关节角度进行离散#xff0c;循环计算很慢#xff0c;随着角度划分越来越细#xff0c;怎么提高速度是一个问题。
最优解决方法
fun_handle matlabFunction(T_t2b_RPY_tmp);T_t2b_RPY_tmp是 transform…来源
计算机器人 transformation matrix 相关内容时对于关节角度进行离散循环计算很慢随着角度划分越来越细怎么提高速度是一个问题。
最优解决方法
fun_handle matlabFunction(T_t2b_RPY_tmp);T_t2b_RPY_tmp是 transformation matrix 其中使用 符号类型 syms 关节角度直接把它转换成函数。注意查看函数变量顺序
fun_handle function_handle with value:(theta_P,theta_R,theta_Y)reshape([cos(theta_Y).*sin(theta_R)cos(theta_R).*sin...然后直接使用循环进行计算 tic
fun_handle matlabFunction(T_t2b_RPY_tmp);
AAA zeros(4,4,prod(num_point));
p 0;
for i Rollfor j Pitchfor k Yawp p 1;AAA(:,:,p) fun_handle(j,i,k);endend
end
toc使用符号计算 时间差别 上千倍
tic
BBB zeros(4,4,prod(num_point));
p 0;
for i Rollfor j Pitchfor k Yawp p 1;BBB(:,:,p) double(subs(T_t2b_RPY_tmp, {theta_R theta_P theta_Y}, {i j k}));endend
end
toc问题两个计算结果有差别
把两者结果作差D1 AAA-BBB; 可以看到结果不一样不过都小于 10^-4.
val(:,:,1) 1.0e-15 *0 0.0000 0 00 -0.0612 0 00.0612 0 0.0000 0.61230 0 0 0val(:,:,2) 1.0e-04 *-0.2846 0.0000 0.2190 0.1895-0.2190 -0.0000 -0.2846 0.15370.0000 0 0.0000 0.00000 0 0 0val(:,:,3) 1.0e-04 *-0.1169 0.0000 0.4760 -0.2399-0.4760 -0.0000 -0.1169 -0.16910.0000 0 0.0000 0.00000 0 0 0isequal(round(AAA,5), round(BBB,5)) 对比精度这个是由于两者计算精度不一样具体原理没有搞清楚详情参考
Why is there a significant difference in the assignment results of functions using “subs” and “feval”Problem of creating function handle from the result of symbolic differentiationGetting different results from function handle syms for a same equation. How to avoid it?Why I got different result by using matlabFunction and subs to do symbolic substitution?
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/87531.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!