- 1、本文档共11页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
matlab效率(matlab效率)
matlab效率(matlab效率)
Students Bowen, benefit from the collection here.
-
Ive been talking about theory before, and to avoid being a pure theory blog, talk about the most experimental part of this: coding.
Matlab is the most widely used software in numerical computation and simulation. It is convenient and efficient, and you can usually convert pseudo code algorithms into matlab code directly. But at the same time, matlab also has a lot of performance traps. For example, for statements that are critical.
In MATLAB, there are at least two ways to add an array of each element to 1., one from the generic programming language for, i=1:length (a), a (I), =a (I), +1, end, and the other to learn from the mathematical notation a=a+1.
But in MATLAB, the performance of the two implementation is very different. Although the MATLAB in the continuous optimization of the implementation of for, but even matlab 2010b on my laptop (Core 2 Duo 2.4 GHz, 4GB, Win7), for a one-dimensional array of 100 thousand elements, the first to achieve 5 microseconds, while the second only 0.4 delicate. The latter is 10 times faster.
In fact, using MATLAB, youll find that MATLABs own functions usually have very high performance. For example, just mentioned a=a+1, or sorting sort (a), as well as commendable matrix multiplication, SVD decomposition, and so on. In fact, for two matrices A and B, if you simply implement with three layers of for loops (using C), the performance will definitely be much worse than matlab.
Although the Matlab interface is implemented with java to facilitate cross platform, performance is not satisfactory, but the kernel is implemented with C. Try the command matlab -nojvm. For matrix operations, Matlab is called a highly optimized BLAS/LAPACK library. For example, the general matrix multiplication provided by BLAS level3, it will be split into many small pieces of the matrix, make full use of memory continuity, CPUs cache architecture, multi-threaded, etc. to optimize the imp
您可能关注的文档
- coreldraw题库(coreldraw题库).doc
- 图表统计在应用问题教学中的尝试(The attempt of chart statistics in the teaching of applied problems).doc
- 图解系列(Graphic series).doc
- 圆的面积---邱子珍(The area of the circle --- Qiu Zizhen).doc
- 土壤污染(soil pollution).doc
- 土建施工员应该知道的数据(The data that the builder should know).doc
- 土建管理(Civil Engineering Management).doc
- 土楼(Tulou).doc
- 土豆的营养价值(The nutritional value of potatoes).doc
- 圣典(Canon).doc
- mactonla(mactonla).doc
- matlab(MATLAB).doc
- maven管理springjar包(maven管理springjar包).doc
- maya中英文对照及快捷键(Maya Chinese and English controls and shortcut keys).doc
- maya影视动画秘籍83招(Maya movie animation cheats 83 strokes).doc
- mb525 可删除的程序().doc
- mba全套中文教程-生产与运作原理-第一部-t0102(MBA complete Chinese tutorial - Principles of production and operation - Part 1 -t0102).doc
- mc919ll线刷机说明(Mc919ll line brush description).doc
- mcs控制系统 要求(MCS control system requirements).doc
- meghan trainor - all about that bass(Meghan Trainor -所有关于低音).doc
最近下载
- 语文期中考试成绩分析及教学反思.docx VIP
- 2025嘉兴市申嘉有轨电车运营管理有限公司招聘5人笔试备考题库及答案解析.docx
- AP统计学 2019年真题 附答案和评分标准 AP Statistics 2019 Real Exam with Answers and Scoring Guidelines.pdf VIP
- 工程造价管理工程造价构成.pptx VIP
- 货车挂靠协议.docx VIP
- 苏州拙政园ppt课件.pptx VIP
- 医院医疗设备管理员及使用人员岗位职责.pptx VIP
- 类风湿关节炎中西医结合诊疗专家共识(2025版).pdf
- 八年级下数学期中测试题(a卷).pdf VIP
- 2024年山东省青岛十九中自主招生化学试卷 .pdf VIP
文档评论(0)