回答編集履歴
1
追記
test
CHANGED
@@ -11,3 +11,25 @@
|
|
11
11
|
end
|
12
12
|
|
13
13
|
plot(1:51, X,'-o')
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
v が2次元の場合
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
X=[0;0];%例
|
22
|
+
|
23
|
+
dt=0.1;
|
24
|
+
|
25
|
+
v=[1;0.1];%例
|
26
|
+
|
27
|
+
for t=1:50
|
28
|
+
|
29
|
+
X(:,t+1)=X(:,t)+v*dt;
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
plot(X(1,:),X(2,:),'o-')
|
34
|
+
|
35
|
+
shg
|