Skip to content

Instantly share code, notes, and snippets.

@40823108
40823108 / top.dart
Created October 30, 2019 11:47
top
// f 為沿位移方向的施力
// dx/dt = v, dv/dt = (f-kx-bv)/m
// dx / dt = (t - x)/2, 起始值 t0=0, x0=1, 求 t=2 時的 x 值
//
// 已知起始值 t0 與 x0 後, 可以利用下列 rungeKutta 函式, 以
// h 為每步階增量值, 求 dxdt 常微分方程式任一 t 的對應值 x
// 定義函式 rungeKutta, 共有四個輸入變數
// 物體質量
const num m = 1;
// 對質量的施力 f
@40823108
40823108 / loop.dart
Created October 17, 2019 10:48
loop
void main() {
for (var i = 0; i < 4; i++) {
print('hello $i');
}
}
@40823108
40823108 / hello.dart
Last active September 26, 2019 15:25
hello world
void main() {
print("哈囉!");
}