Make Mermaid labels parser-safe

This commit is contained in:
deamonkai
2026-04-04 17:49:22 -05:00
parent ee9a4a52a1
commit 2c9bd0be6c

View File

@@ -5,7 +5,7 @@ flowchart TD
A([Start Script]) --> B[Clear Workspace: clear, close all, clc]
B --> C[Set Parameters: k1, k2, m1, m2]
C --> D[Set Time Grid: t0, tf, dt, tspan]
D --> E[Set Initial State: x0 = (z1, z1dot, z2, z2dot)^T]
D --> E[Set Initial State Vector x0 with 4 states]
E --> F[Define Input Force Functions: F1, F2, F3]
F --> G[Case 1: b=100, F=F1]
@@ -34,7 +34,7 @@ flowchart TD
W --> X[Unpack States: z1, z1dot, z2, z2dot]
X --> Y[Evaluate Input: u = Ffun(t)]
Y --> Z[Compute Accelerations: z1ddot and z2ddot]
Z --> AA[Return State Derivative: dx = (z1dot, z1ddot, z2dot, z2ddot)^T]
Z --> AA[Return State Derivative Vector dx with 4 elements]
AA --> AB([End])
```
@@ -56,7 +56,7 @@ where \(u(t)\) is one of the three forcing functions depending on the case.
flowchart TD
A([Start]) --> B[Define constants and masses: k1, k2, m1, m2]
B --> C[Define simulation time: t0, tf, dt, tspan]
C --> D[Set initial state vector: x0 = (z1, z1dot, z2, z2dot)^T]
C --> D[Set initial state vector x0 with 4 states]
D --> E[Define force inputs: F1=100, F2=100sin(0.25t), F3=100sin(0.50t)]
E --> F[Create case table: (Case, b, Force)]
@@ -85,6 +85,6 @@ flowchart LR
A2 --> A3[Compute input force: u = Ffun(t)]
A3 --> A4[Compute z1ddot from mass 1 equation]
A4 --> A5[Compute z2ddot from mass 2 equation]
A5 --> A6[Assemble derivative: dx = (z1dot, z1ddot, z2dot, z2ddot)^T]
A5 --> A6[Assemble derivative vector dx with 4 elements]
A6 --> A7[Return dx to ode45]
```