惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
Cyberwarzone
Cyberwarzone
Cisco Talos Blog
Cisco Talos Blog
I
Intezer
V
Vulnerabilities – Threatpost
C
CERT Recently Published Vulnerability Notes
AWS News Blog
AWS News Blog
L
LINUX DO - 热门话题
AI
AI
Webroot Blog
Webroot Blog
W
WeLiveSecurity
O
OpenAI News
T
Threatpost
L
Lohrmann on Cybersecurity
S
Secure Thoughts
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
The Exploit Database - CXSecurity.com
C
Cyber Attacks, Cyber Crime and Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Security Affairs
V2EX - 技术
V2EX - 技术
Cloudbric
Cloudbric
Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
F
Fortinet All Blogs
G
Google Developers Blog
K
Kaspersky official blog
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
云风的 BLOG
云风的 BLOG
T
Troy Hunt's Blog
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
T
The Blog of Author Tim Ferriss
L
LangChain Blog
A
About on SuperTechFans
D
Docker
WordPress大学
WordPress大学
V
V2EX
Simon Willison's Weblog
Simon Willison's Weblog
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs

博客园 - 遗忘海岸

简协运动模拟 电磁场中的运动轨迹模拟 带阻力的平抛运动 C# 队列的一些并发模拟 devexpress gridview master,detail视图 focuseRowHandle 同步选中 C# Tcp Server端实现,使用TcpListener 深信服务超融合管理Api调用 GDI+画工作流图的一些总结 绘制贝塞而曲线 GDI+画直线带箭头 devexpress schedulerControl Gantt View 使用 逻辑回归损失函数求导 matplotlim柱状图 匀加速运动模拟python,(matplotlib) C# 实现排列 python 类鸟群Boids C#动态编译 正太分布数据排序后分段数据的方差与标准差 Android 的一个通用列表单选AlertDialog封装
圆周运动模拟
遗忘海岸 · 2025-12-18 · via 博客园 - 遗忘海岸

%% 恒力始终垂直于速度的运动轨迹模拟
clear; clc; close all;
hold on;
grid on;
axis equal;
%% 参数设置
m = 2.0;            % 质量 (kg)
v0 = 5.0;           % 初始速度大小 (m/s)
f = 2.0;            % 恒力大小 (N)
theta0 = 0;         % 初始速度方向 (弧度,0表示+x方向)
t_total = 100;       % 总时间 (s)
dt = 0.0001;          % 时间步长 (s)

% 计算理论值
r_theory = m * v0^2 / f;           % 理论半径
omega_theory = f / (m * v0);       % 理论角速度
T_theory = 2*pi / omega_theory;    % 理论周期

fprintf('理论计算值:\n');
fprintf('  半径 r = %.3f m\n', r_theory);
fprintf('  角速度 ω = %.3f rad/s\n', omega_theory);
fprintf('  周期 T = %.3f s\n', T_theory);

%% 数值模拟(欧拉法)
% 初始化数组
n_steps = round(t_total / dt);
t = linspace(0, t_total, n_steps);
x = zeros(1, n_steps);
y = zeros(1, n_steps);
vx = zeros(1, n_steps);
vy = zeros(1, n_steps);

% 初始条件
x(1) = 0;                       % 初始位置
y(1) = 0;
vx(1) = v0 * cos(theta0);       % 初始速度
vy(1) = v0 * sin(theta0);

% 数值积分
for i = 1:n_steps-1
    % 当前速度大小和方向
    v = sqrt(vx(i)^2 + vy(i)^2);
    
    % 计算垂直于速度方向的单位向量
    % 垂直于(vx, vy)的向量可以是(-vy, vx)或(vy, -vx)
    % 这里选择使质点顺时针旋转的方向
    nx = -vy(i) / v;
    ny = vx(i) / v;
    
    % 计算加速度(力垂直于速度)
    ax = (f / m) * nx;
    ay = (f / m) * ny;

    % 更新速度和位置
    vx(i+1) = vx(i) + ax * dt;
    vy(i+1) = vy(i) + ay * dt;
    
    x(i+1) = x(i) + vx(i) * dt;
    y(i+1) = y(i) + vy(i) * dt;
end



plot(x, y, 'b-', 'LineWidth', 1.5);

View Code