Skip to content

Commit 034169d

Browse files
Fix missing multiplication operator in pendulum example
Add missing multiplication operator between 0.1 and sin(t) in the pendulum external torque definition. In Julia, you cannot write 0.1sin(t) - you need 0.1 * sin(t) for the multiplication operator. This fixes a syntax error that would cause the code example to fail when executed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7bc71f7 commit 034169d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ end
379379
u₀ = [θ₀, ω₀] # initial state vector
380380
tspan = (0.0, 10.0) # time interval
381381
382-
M = t -> 0.1sin(t) # external torque [Nm]
382+
M = t -> 0.1 * sin(t) # external torque [Nm]
383383
384384
prob = DE.ODEProblem(pendulum!, u₀, tspan, M)
385385
sol = DE.solve(prob)

0 commit comments

Comments
 (0)