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

推荐订阅源

T
Threat Research - Cisco Blogs
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
Recorded Future
Recorded Future
The Register - Security
The Register - Security
Microsoft Azure Blog
Microsoft Azure Blog
Stack Overflow Blog
Stack Overflow Blog
爱范儿
爱范儿
大猫的无限游戏
大猫的无限游戏
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
Webroot Blog
Webroot Blog
Help Net Security
Help Net Security
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Hacker News: Ask HN
Hacker News: Ask HN
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tailwind CSS Blog
J
Java Code Geeks
C
CXSECURITY Database RSS Feed - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyberwarzone
Cyberwarzone
小众软件
小众软件
G
Google Developers Blog
SecWiki News
SecWiki News
V
V2EX
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
S
Security Affairs
AI
AI
S
Securelist
D
Docker
人人都是产品经理
人人都是产品经理
T
Troy Hunt's Blog
罗磊的独立博客
The Hacker News
The Hacker News
阮一峰的网络日志
阮一峰的网络日志
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
P
Proofpoint News Feed
Vercel News
Vercel News
Jina AI
Jina AI

博客园 - 遗忘海岸

电磁场中的运动轨迹模拟 圆周运动模拟 带阻力的平抛运动 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-19 · via 博客园 - 遗忘海岸

%% simple harmonic motion

clear; clc; close all;
hold on;
grid on;
axis equal;

%% 参数设置
K=10; %弹簧劲度系数 N/m
m=0.2; %震子质量 Kg

t_total = 10;       % 总时间 (s)
dt = 0.0001;          % 时间步长 (s)

%% 数值模拟(欧拉法)
% 初始化数组
n_steps = round(t_total / dt);
t = linspace(0, t_total, n_steps);
x=[];
v=[];
a=[];

x(1)=-0.2; %从负半轴释放
v(1)=0;
a(1)=-x(1)*K;

for i = 1:n_steps-1

  a(i+1)=-x(i)*K;
  v(i+1)=v(i) + a(i) * dt;
  x(i+1)=x(i)+v(i) *dt;

end

subplot(2,2,1)

plot(t, x, 'b-', 'LineWidth', 1);
title('t-x');
grid on
axis equal

subplot(2,2,2)
plot(t, v, 'r-', 'LineWidth', 1);
title('t-v');
grid on
axis equal

subplot(2,2,3)
plot(t, a, 'g-', 'LineWidth', 1);
title('t-a');
grid on
% axis equal

View Code