
如果有人能告訴我為什麼下面的程式碼中的情況表現得很荒謬,我會非常高興。
\begin{align}
I^*= \begin{cases}
0, & \left(\mathbb{E}\left[\theta_c|C=1\right] < \theta_i \ \
\text{and} \ \ \mathbb{E}\left[\max\left\{\theta_i,\theta_c\right\}|C=1\right] <
\frac{c_I}{\gamma}\right) \\
0, & \left(\mathbb{E}\left[\theta_c|C=1\right] \geq
\theta_i \ \ \text{and} \ \ \mathbb{E}\left[\max\left\
\theta_i,\theta_c\right\}|C=1\right] < \frac{c_I}{\gamma}\right) \\
\left[0,1\right], & \left(\mathbb{E}\left[\theta_c|C=1\right] < \theta_i \ \
\text{and} \ \ \mathbb{E}\left[\max\left\{\theta_i,\theta_c\right\}|C=1\right] =
\frac{c_I} {\gamma}\right) \\
\left[0,1\right], & \left(\mathbb{E}\left[\theta_c|C=1\right] \geq
\theta_i \ \ \text{and} \ \ \mathbb{E}\left[\max\left\
{\theta_i,\theta_c\right\}|C=1\right] = \frac{c_I}{\gamma}\right) \\
1, \left(\mathbb{E}\left[\theta_c|C=1\right] < \theta_i \ \ \text{and} \ \
\mathbb{E}\left[\max\left\{\theta_i,\theta_c\right\}|C=1\right] > \frac{c_I}
{\gamma}\right) \\
1, \left(\mathbb{E}\left[\theta_c|C=1\right] \geq \theta_i \ \
\text{and} \ \ \mathbb{E}\left[\max\left\{\theta_i,\theta_c\right\}|C=1\right] >
\frac{c_I}{\gamma}\right)
\end{cases}
\end{align}
程式碼如下圖:
謝謝
答案1
您在程式碼的最後兩行中缺少&
after :1,
\begin{equation}
I^*= \begin{cases}
0, & \text{if }
\mathbb{E}[\theta_c\mid C=1] < \theta_i
\text{ and }
\mathbb{E}[\max\{\theta_i,\theta_c\} \mid C=1] < \frac{c_I}{\gamma}
\\
0, & \text{if }
\mathbb{E}[\theta_c \mid C=1] \geq \theta_i
\text{ and }
\mathbb{E}[\max\{\theta_i,\theta_c\} \mid C=1] < \frac{c_I}{\gamma}
\\
[0,1], & \mathbb{E}[\theta_c \mid C=1] < \theta_i
\text{ and }
\mathbb{E}[\max\{\theta_i,\theta_c\} \mid C=1] = \frac{c_I}{\gamma}
\\
[0,1], & \text{if }
\mathbb{E}[\theta_c \mid C=1] \geq \theta_i
\text{ and }
\mathbb{E}[\max\{\theta_i,\theta_c\} \mid C=1] = \frac{c_I}{\gamma}
\\
1, & \text{if }
\mathbb{E}[\theta_c \mid C=1] < \theta_i
\text{ and }
\mathbb{E}[\max\{\theta_i,\theta_c\} \mid C=1] > \frac{c_I}{\gamma}
\\
1, & \text{if }
\mathbb{E}[\theta_c \mid C=1] \geq \theta_i
\text{ and }
\mathbb{E}[\max\{\theta_i,\theta_c\} \mid C=1] > \frac{c_I}{\gamma}
\end{cases}
\end{equation}
請注意,我做了一些更多的更改來改進事情,即我刪除了外面的括號,放在if
每一行中,刪除了周圍不必要的空格and
(並將它們放在 內\text{...}
,但這不是必需的) ,我刪除了所有虛假的\left...\right
並且我更改|
為\mid
以獲得正確的間距。
(我希望我沒有搞砸任何事情,我現在無法測試程式碼。)