Hi there, for the purpose of explaining the process of a bi-dimensional wavelength/time encoding in OCDMA systems using a comprehensive illustration, I would like a simple Latex code, Python or MATLAB script for plotting a 3D figure of encoded pulses. The wavelength, time, and intensity are represented by the axes of the graph and the pulses are spread within the wavelength/time space using a unipolar encoding scheme. Would you be able to provide the code for such an illustration ?
Certainly! Here's a simple Python script using the Matplotlib library to plot a 3D figure of encoded pulses:

```python
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

# Generate sample data
num_pulses = 10
wavelengths = np.linspace(1500, 1600, num_pulses)
times = np.linspace(0, 1, num_pulses)
intensities = np.random.random(num_pulses)

# Create 3D plot
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

# Plot pulses
for i in range(num_pulses):
    ax.scatter(wavelengths[i], times[i], intensities[i], marker='o')

# Set axis labels
ax.set_xlabel('Wavelength (nm)')
ax.set_ylabel('Time (s)')
ax.set_zlabel('Intensity')

# Show plot
plt.show()
```

This script generates a 3D plot with random intensities for 10 pulses. You can adjust the number of pulses, wavelengths, and time intervals as needed. Remember to install the Matplotlib library if you haven't already:

```bash
pip install matplotlib
```
Great, thanks!