当前位置:网站首页>【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
2022-07-03 18:48:00 【海神之光】
一、获取代码方式
获取代码方式1:
完整代码已上传我的资源:【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
获取代码方式2:
通过订阅紫极神光博客付费专栏,凭支付凭证,私信博主,可获得此代码。
备注:
订阅紫极神光博客付费专栏,可免费获得1份代码(有效期为订阅日起,三天内有效);
二、部分源代码
function main
M = 20000000; %两千万 X 两千万 矩阵
f1 = @()sinfun1(M);
f2 = @()sinfun2(M);
f3 = @()sinfun3(M);
f4 = @()sinfun4(M);
sprintf('f1-无预分配for循环用时:%f',timeit(f1))
sprintf('f2-有预分配for循环用时:%f',timeit(f2))
sprintf('f1/f2倍数:%f',timeit(f1)/timeit(f2))
sprintf('f3-无预分配向量用时:%f',timeit(f3))
sprintf('f4-有预分配向量用时:%f',timeit(f4))
sprintf('f2/f4倍数:%f',timeit(f2)/timeit(f4))
sprintf('f1/f4倍数:%f',timeit(f1)/timeit(f4))
function y = sinfun1(M)
x = 0:M - 1;
for k = 1:numel(x)
y(k) = sin(x(k) / (100*pi));
end
function y = sinfun2(M)
x = 0:M-1;
y = zeros(1, numel(x));
for k = 1:numel(x)
y(k) = sin(x(k) / (100*pi));
end
三、运行结果
四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1]李昕.MATLAB数学建模[M].清华大学出版社.2017
[2]王健,赵国生.MATLAB数学建模与仿真[M].清华大学出版社.2016
[3]余胜威.MATLAB数学建模经典案例实战[M].清华大学出版社.2015
边栏推荐
- 199. Right view of binary tree - breadth search
- TypeScript 官网教程
- [leetcode周赛]第300场——6110. 网格图中递增路径的数目-较难
- Scrapy爬虫框架
- The installation path cannot be selected when installing MySQL 8.0.23
- How about the Moco model?
- Analysis of the reasons why enterprises build their own software development teams to use software manpower outsourcing services at the same time
- CV in transformer learning notes (continuously updated)
- 编程中常见的 Foo 是什么意思?
- Real time split network (continuous update)
猜你喜欢
How to read the source code [debug and observe the source code]
组策略中开机脚本与登录脚本所使用的用户身份
Web3 credential network project galaxy is better than nym?
How many convolution methods does deep learning have? (including drawings)
Add control at the top of compose lazycolumn
Transformer T5 model read slowly
2022-2028 global sepsis treatment drug industry research and trend analysis report
Record: MySQL changes the time zone
Recommend a simple browser tab
Unity webgl optimization
随机推荐
Reappearance of ASPP (atlas spatial pyramid pooling) code
记录在模拟器中运行flutter时报的错
Ping problem between virtual machine and development board
leetcode:11. 盛最多水的容器【雙指針 + 貪心 + 去除最短板】
Common PostgreSQL commands
Torch learning notes (7) -- take lenet as an example for dataload operation (detailed explanation + reserve knowledge supplement)
Recent learning experience
JS_ Array_ sort
leetcode:556. 下一个更大元素 III【模拟 + 尽可能少变更】
Typescript official website tutorial
Integrated easy to pay secondary domain name distribution system
Know what it is, and know why, JS object creation and inheritance [summary and sorting]
Real time split network (continuous update)
[combinatorics] dislocation problem (recursive formula | general term formula | derivation process)*
Record: MySQL changes the time zone
Getting started with JDBC
Compose LazyColumn 顶部添加控件
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext
What is the function of registering DLLs- What does registering a DLL do?
flask 生成swagger文档