当前位置:网站首页>【数学建模】基于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
边栏推荐
- [Godot] add menu button
- A green plug-in that allows you to stay focused, live and work hard
- [combinatorics] exponential generating function (example 2 of solving multiple set permutation with exponential generating function)
- Sqlalchemy - subquery in a where clause - Sqlalchemy - subquery in a where clause
- There are several levels of personal income tax
- High concurrency Architecture - separate databases and tables
- 组策略中开机脚本与登录脚本所使用的用户身份
- HOW TO WRITE A DAILY LAB NOTE?
- Raft log replication
- leetcode:556. Next larger element III [simulation + change as little as possible]
猜你喜欢
![Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]](/img/d4/cbbaec40119be6cb5594899e348261.png)
Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]

How does GCN use large convolution instead of small convolution? (the explanation of the paper includes super detailed notes + Chinese English comparison + pictures)

Mysql45 lecture learning notes (II)

DriveSeg:动态驾驶场景分割数据集

leetcode:556. 下一个更大元素 III【模拟 + 尽可能少变更】

What problems can cross-border e-commerce sellers solve with multi platform ERP management system

SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)

记录在模拟器中运行flutter时报的错

Shell script return value with which output
![[Yu Yue education] theoretical mechanics reference materials of Shanghai Jiaotong University](/img/52/b97c618a8f2eb29ad0ccca221bb5c1.jpg)
[Yu Yue education] theoretical mechanics reference materials of Shanghai Jiaotong University
随机推荐
知其然,而知其所以然,JS 对象创建与继承【汇总梳理】
论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
SSM integration - joint debugging of front and rear protocols (list function, add function, add function status processing, modify function, delete function)
leetcode:556. 下一个更大元素 III【模拟 + 尽可能少变更】
Multifunctional web file manager filestash
PyTorch中在反向传播前为什么要手动将梯度清零?
Sqlalchemy - subquery in a where clause - Sqlalchemy - subquery in a where clause
Dynamic planning -- expansion topics
In addition to the prickles that pierce your skin, there are poems and distant places that originally haunt you in plain life
Compose LazyColumn 顶部添加控件
Record: install MySQL on ubuntu18.04
Integrated easy to pay secondary domain name distribution system
Day-27 database
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext
041. (2.10) talk about manpower outsourcing
Reading a line from ifstream into a string variable
Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
php-fpm的max_chindren的一些误区
我们做了一个智能零售结算平台
Administrative division code acquisition