This repository contains the MATLAB codes used for the design, simulation, techno-economic analysis (TEA), and life cycle assessment (LCA) of different anaerobic membrane bioreactor (AnMBR) configurations and the conventional activated sludge (AS) process.