\section*{APPENDIX}
\addcontentsline{toc}{section}{APPENDIX}

\subsection*{A. Python Code Example}
The following Python code demonstrates a simple data analysis script for electrochemical sensor data:

\vspace{0.3cm}

\begin{lstlisting}[language=Python, caption=Python script for electrochemical data analysis, label=lst:python]
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats

# Data from electrochemical measurements
concentration = np.array([0.5, 1, 5, 10, 20, 50, 100])  # uM
peak_current = np.array([0.48, 0.71, 2.45, 4.32, 8.15, 21.35, 43.12])  # uA

# Perform linear regression
slope, intercept, r_value, p_value, std_err = stats.linregress(
    concentration, peak_current
)

# Calculate detection limit (LOD)
noise = 0.05  # baseline noise (uA)
lod = 3 * noise / slope

print(f"Linear equation: I = {slope:.3f}C + {intercept:.3f}")
print(f"R-squared: {r_value**2:.4f}")
print(f"Limit of detection: {lod:.2f} uM")

# Plot calibration curve
plt.figure(figsize=(8, 6))
plt.plot(concentration, peak_current, 'bo-', linewidth=2, markersize=8)
plt.xlabel('Concentration (uM)')
plt.ylabel('Peak Current (uA)')
plt.title('Calibration Curve for Paracetamol Detection')
plt.grid(True, alpha=0.3)
plt.savefig('calibration_curve.png', dpi=300)
plt.show()
\end{lstlisting}

\subsection*{B. R Code Example}
R code for statistical analysis of analytical data:

\vspace{0.3cm}

\begin{lstlisting}[language=R, caption=R script for statistical analysis, label=lst:r]
# Load required libraries
library(ggplot2)
library(dplyr)

# Create data frame
data <- data.frame(
  concentration = c(0.5, 1, 5, 10, 20, 50, 100),
  peak_current = c(0.48, 0.71, 2.45, 4.32, 8.15, 21.35, 43.12)
)

# Perform linear model
model <- lm(peak_current ~ concentration, data = data)

# Summary statistics
summary(model)

# Calculate LOD
noise <- 0.05
lod <- 3 * noise / coef(model)[2]
cat("Limit of Detection:", round(lod, 2), "uM\n")

# Create calibration plot
ggplot(data, aes(x = concentration, y = peak_current)) +
  geom_point(size = 3, color = "blue") +
  geom_smooth(method = "lm", se = TRUE, color = "red") +
  labs(
    title = "Calibration Curve",
    x = "Concentration (uM)",
    y = "Peak Current (uA)"
  ) +
  theme_minimal() +
  theme(
    plot.title = element_text(hjust = 0.5),
    panel.grid.minor = element_blank()
  )

# Save plot
ggsave("r_calibration_plot.pdf", width = 6, height = 4)
\end{lstlisting}

\subsection*{C. Maple Code Example}
Maple code for mathematical modeling of electrochemical processes:

\vspace{0.3cm}

\begin{lstlisting}[language=Maple, caption=Maple script for electrochemical modeling, label=lst:maple]
# Restart Maple session
restart;
with(plots):
with(LinearAlgebra):

# Define parameters
E0 := 0.35:     # Standard potential (V)
n := 2:         # Number of electrons
F := 96485:     # Faraday constant (C/mol)
R := 8.314:     # Gas constant (J/mol.K)
T := 298:       # Temperature (K)

# Nernst equation
E := E0 - (R*T)/(n*F) * ln(Q);

# Define concentration ratio Q
Q := C_ox / C_red;

# Butler-Volmer equation for current density
i := i0 * (exp(alpha*n*F*eta/(R*T)) - exp(-(1-alpha)*n*F*eta/(R*T)));

# Define parameters for Butler-Volmer
i0 := 1e-6:    # Exchange current density (A/cm^2)
alpha := 0.5:  # Transfer coefficient
eta := E - E0: # Overpotential (V)

# Plot current vs overpotential
plot(i, eta = -0.5..0.5, 
     labels = ["Overpotential (V)", "Current Density (A/cm^2)"],
     title = "Butler-Volmer Plot",
     color = "blue",
     thickness = 2);

# Calculate limiting current
D := 1e-5:     # Diffusion coefficient (cm^2/s)
C_bulk := 1e-3:# Bulk concentration (mol/cm^3)
delta := 0.01: # Diffusion layer thickness (cm)

i_lim := (n * F * D * C_bulk) / delta;

printf("Limiting current density: %e A/cm^2\n", i_lim);
\end{lstlisting}

\subsection*{D. MATLAB/Octave Code Example}
MATLAB/Octave code for signal processing of electrochemical data:

\vspace{0.3cm}

\begin{lstlisting}[language=MATLAB, caption=MATLAB script for signal processing, label=lst:matlab]
% Electrochemical signal processing
clear; clc; close all;

% Load experimental data (example)
concentration = [0.5, 1, 5, 10, 20, 50, 100];  % uM
peak_current = [0.48, 0.71, 2.45, 4.32, 8.15, 21.35, 43.12];  % uA

% Perform linear regression
p = polyfit(concentration, peak_current, 1);
fitted_curve = polyval(p, concentration);

% Calculate statistics
residuals = peak_current - fitted_curve;
RSS = sum(residuals.^2);
TSS = sum((peak_current - mean(peak_current)).^2);
R_squared = 1 - RSS/TSS;

% Calculate LOD
noise = 0.05;  % baseline noise (uA)
slope = p(1);
LOD = 3 * noise / slope;

% Display results
fprintf('Calibration equation: I = %.3fC + %.3f\n', p(1), p(2));
fprintf('R-squared: %.4f\n', R_squared);
fprintf('Limit of Detection: %.2f uM\n', LOD);

% Create figure
figure('Position', [100, 100, 800, 600]);
plot(concentration, peak_current, 'bo', 'MarkerSize', 10, 'LineWidth', 1.5);
hold on;
plot(concentration, fitted_curve, 'r-', 'LineWidth', 2);
xlabel('Concentration (uM)', 'FontSize', 12);
ylabel('Peak Current (uA)', 'FontSize', 12);
title('Calibration Curve for Paracetamol Detection', 'FontSize', 14);
legend('Experimental Data', 'Linear Fit', 'Location', 'northwest');
grid on;
set(gca, 'FontSize', 11);

% Save figure
saveas(gcf, 'matlab_calibration.png');
\end{lstlisting}

\subsection*{E. SQL Code Example}
SQL query for managing analytical laboratory database:

\vspace{0.3cm}

\begin{lstlisting}[language=SQL, caption=SQL queries for laboratory data management, label=lst:sql]
-- Create experiments table
CREATE TABLE experiments (
    experiment_id INTEGER PRIMARY KEY,
    experiment_date DATE NOT NULL,
    analyst_name VARCHAR(100),
    sample_type VARCHAR(50),
    electrode_type VARCHAR(50)
);

-- Create measurements table
CREATE TABLE measurements (
    measurement_id INTEGER PRIMARY KEY,
    experiment_id INTEGER,
    concentration REAL,
    peak_current REAL,
    FOREIGN KEY (experiment_id) REFERENCES experiments(experiment_id)
);

-- Insert sample data
INSERT INTO experiments VALUES 
(1, '2024-01-15', 'Aditya Pratama', 'Paracetamol', 'GO/GCE'),
(2, '2024-01-16', 'Siti Nuraini', 'Paracetamol', 'Bare GCE');

INSERT INTO measurements VALUES 
(1, 1, 0.5, 0.48),
(2, 1, 1.0, 0.71),
(3, 1, 5.0, 2.45),
(4, 1, 10.0, 4.32);

-- Query for calibration data
SELECT 
    e.experiment_date,
    e.analyst_name,
    e.electrode_type,
    m.concentration,
    m.peak_current
FROM experiments e
JOIN measurements m ON e.experiment_id = m.experiment_id
WHERE e.sample_type = 'Paracetamol'
ORDER BY e.experiment_date, m.concentration;

-- Calculate average peak current per concentration
SELECT 
    concentration,
    AVG(peak_current) as avg_current,
    COUNT(*) as n_measurements,
    STDEV(peak_current) as std_dev
FROM measurements
GROUP BY concentration;
\end{lstlisting}