Skip to content

Commit b5ee26a

Browse files
committed
done
1 parent 0037295 commit b5ee26a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

simulateOneStep.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
function sPrime = simulateOneStep(theta,thetaDot,deltaT,u)
2-
J = m = l = 1;
2+
J = 1;
3+
m = 1;
4+
l = 1;
35
gamma = 0.1;
46
g = 9.81;
57
Jt = J + m * l ^ 2;
@@ -15,7 +17,7 @@
1517
end
1618

1719
while thetaN < - 3.14
18-
thetaN += 2 * 3.14;
20+
thetaN = thetaN + 2 * 3.14;
1921
end
2022

2123
sPrime = [thetaN; thetadotN];

transitionProbabilities.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
% Add in final probability to the last stte
5353
for d = 1:dimensions
54-
T(d, numStates) += 1 - sumProb(d, 1);
54+
T(d, numStates) = T(d, numStates) + 1 - sumProb(d, 1);
5555
sumProb(d, 1) = sumProb(d, 1) + 1 - sumProb(d, 1);
5656
end
5757

0 commit comments

Comments
 (0)