当前位置:网站首页>【数学建模】基于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
边栏推荐
- Transformer T5 model read slowly
- Torch learning notes (2) -- 11 common operation modes of tensor
- Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
- What is the function of registering DLLs- What does registering a DLL do?
- shell 脚本中关于用户输入参数的处理
- Typescript official website tutorial
- 达梦数据库的物理备份和还原简解
- “google is not defined” when using Google Maps V3 in Firefox remotely
- What problems can cross-border e-commerce sellers solve with multi platform ERP management system
- Multifunctional web file manager filestash
猜你喜欢
Gao Qing, Beijing University of Aeronautics and Astronautics: CIM is a natural quantum computing platform for graph data processing
SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)
Record: pymysql is used in pycharm to connect to the database
DriveSeg:动态驾驶场景分割数据集
leetcode:556. Next larger element III [simulation + change as little as possible]
A green plug-in that allows you to stay focused, live and work hard
What is SQL get connection
SQL custom collation
[leetcode weekly race] game 300 - 6110 Number of incremental paths in the grid graph - difficult
Integrated easy to pay secondary domain name distribution system
随机推荐
How to design a high concurrency system
Know what it is, and know why, JS object creation and inheritance [summary and sorting]
虚拟机和开发板互Ping问题
application
cipher
Pan for in-depth understanding of the attention mechanism in CV
Integrated easy to pay secondary domain name distribution system
leetcode:11. Container with the most water [double pointer + greed + remove the shortest board]
235. The nearest common ancestor of the binary search tree [LCA template + same search path]
Briefly describe the quantitative analysis system of services
Torch learning notes (7) -- take lenet as an example for dataload operation (detailed explanation + reserve knowledge supplement)
Record: install MySQL on ubuntu18.04
Chisel tutorial - 06 Phased summary: implement an FIR filter (chisel implements 4-bit FIR filter and parameterized FIR filter)
HOW TO WRITE A DAILY LAB NOTE?
High concurrency Architecture - separate databases and tables
Multifunctional web file manager filestash
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Boost.Asio Library
Unity2018 to wechat games without pictures
[Yu Yue education] theoretical mechanics reference materials of Shanghai Jiaotong University