MATLAB对函数做评估
【摘要】
1.使用profile
profile,Longman 给出的解释是:a short description that gives importantdetails about a person, a group of people, or a place。
MATLAB中内置了一个叫做profile的工具,来协助评估程序,也就是对...
1.使用profile
profile,Longman 给出的解释是:a short description that gives importantdetails about a person, a group of people, or a place。
MATLAB中内置了一个叫做profile的工具,来协助评估程序,也就是对程序运行过程的一个shortdescription吧。主要命令有:
profile on 开启
profile off 关闭
profile clear 清空数据
profile viewer 在profiler中看结果
下面我们评估一下下面这个函数:
- function result =example1(count)
- for k = 1:count
- result(k) = sin(k/50);
- if result(k)<-0.9
- result(k) = gammaln(k);
文章来源: wenyusuran.blog.csdn.net,作者:文宇肃然,版权归原作者所有,如需转载,请联系作者。
原文链接:wenyusuran.blog.csdn.net/article/details/38312571
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)