2023高教社杯全国大学生数学建模竞赛B题代码解析

2023高教社杯全国大学生数学建模竞赛B题 多波束测线问题 代码解析

因为一些不可抗力,下面仅展示部分matlab代码(第一问的部分),其余代码看文末

复制代码
x=70;
d=[-4	-3	-2	-1	0	1	2	3	4];
d=70 - 200 * tand(1.5) * d;

w = zeros(1,9);
eta = zeros(1,9);

x0 = [100 100 100 100 100];
options = optimoptions(@fsolve, 'MaxFunctionEvaluations', 10000, 'MaxIterations', 10000);

temp = fsolve(@root5d_1, x0, options);
w(1) = temp(5);
eta(1) = 1-200/w(1);

temp = fsolve(@root5d_2, x0, options);
w(2) = temp(5);
eta(2) = 1-200/w(2);


temp = fsolve(@root5d_3, x0, options);
w(3) = temp(5);
eta(3) = 1-200/w(3);


temp = fsolve(@root5d_4, x0, options);
w(4) = temp(5);
eta(4) = 1-200/w(4);


temp = fsolve(@root5d_5, x0, options);
w(5) = temp(5);
eta(5) = 1-200/w(5);

temp = fsolve(@root5d_6, x0, options);
w(6) = temp(5);
eta(6) = 1-200/w(6);

temp = fsolve(@root5d_7, x0, options);
w(7) = temp(5);
eta(7) = 1-200/w(7);

temp = fsolve(@root5d_8, x0, options);
w(8) = temp(5);
eta(8) = 1-200/w(8);

temp = fsolve(@root5d_9, x0, options);
w(9) = temp(5);
eta(9) = 1-200/w(9);

节选了部分:

复制代码
function F = root5d_7(x)
theta=pi/3*2;alpha=1.5/180*pi;D1=59.5256313723252;
k0=cos(theta/2);k1=cos(theta);k2=cos(pi/2-(theta/2)-alpha);k3=cos(pi/2-(theta/2)+alpha);
F(1) = (x(1)).^2+D1*D1-2*k0*D1.*x(1)-(x(3)).^2;
F(2) = (x(1)).^2+(x(2)).^2-2*k1.*x(1).*x(2)-(x(5)).^2;
F(3) = (x(1)).^2+(x(3)).^2-2*k2.*x(1).*x(3)-D1*D1;
F(4) = (x(2)).^2+(x(4)).^2-2*k3.*x(2).*x(4)-D1*D1;
F(5) = x(4)+x(3)-x(5);


syms q w e r t
theta=120/180*pi;alpha=1.5/180*pi;D1=70;
k0=cos(theta/2);k1=cos(theta);k2=cos(pi/2-(theta/2)-alpha);k3=cos(pi/2-(theta/2)+alpha);
eqns = [0== (q).^2+D1.^2-2*k0*D1.*q-(e).^2,
        0 == (q).*2+(w).*2-2*k1*q.*w-(t).*2,
        0== (q).*2+(e).*2-2*k2*q.*e-D1*2,
        0== (w).*2+(r).*2-2*k3*w.*r-D1*2,
        0== r+e-t];

[q, w, e, r, t] = vpasolve(eqns, [q w e r t], [0,2000;0,2000;0,2000;1,2000;0,2000;])

有关思路、相关代码、讲解视频、参考文献等相关内容可以点击下方群名片哦!

相关推荐
linjoe99几秒前
【Medical AI\pathology】WSI 的 JPEG 压缩质量与存储效率权衡分析
python·图像压缩·计算病理学·wsi
Fightting886 分钟前
Tkinter Button bind hover message
开发语言·python
玄同76541 分钟前
LangChain 1.0 模型接口:多厂商集成与统一调用
开发语言·人工智能·python·langchain·知识图谱·rag·智能体
喵手1 小时前
Python爬虫实战:构建招聘会数据采集系统 - requests+lxml 实战企业名单爬取与智能分析!
爬虫·python·爬虫实战·requests·lxml·零基础python爬虫教学·招聘会数据采集
专注VB编程开发20年1 小时前
python图片验证码识别selenium爬虫--超级鹰实现自动登录,滑块,点击
数据库·python·mysql
iFeng的小屋1 小时前
【2026最新当当网爬虫分享】用Python爬取千本日本相关图书,自动分析价格分布!
开发语言·爬虫·python
民乐团扒谱机1 小时前
【微科普】3D 演奏蠕虫分析图:解码音乐表演情感的 “可视化语言”
python·可视化·音乐·3d图·3d蠕虫
芝士爱知识a2 小时前
AlphaGBM 深度解析:下一代基于 AI 与蒙特卡洛的智能期权分析平台
数据结构·人工智能·python·股票·alphagbm·ai 驱动的智能期权分析·期权
52Hz1182 小时前
力扣230.二叉搜索树中第k小的元素、199.二叉树的右视图、114.二叉树展开为链表
python·算法·leetcode