I need clean, well-documented MATLAB and Python code that lets me analyse and optimise a complete PV*SOL-based solar energy system. The model must cover the full stack—photovoltaic panels, inverters, and battery storage—so that I can quickly tweak array sizes, run performance simulations, and export the results for my reports. Here’s what matters most to me: • A modular structure: separate functions or classes for panels, inverter behaviour, and battery cycling. • Direct compatibility with PV*SOL data exports (CSV / TXT), so I can pull in irradiance profiles and component specs without manual edits. • Clear numerical outputs—energy yield, efficiency, state-of-charge curves—that I can drop straight into my Microsoft Office templates. • Smooth switching between MATLAB and Python; if you tackle one language first, please leave concise notes that make a later port painless. I’ll supply sample PV*SOL files and my current calculation flow once we start. If you’ve already built solar-energy toolkits, feel free to point me to a snippet or repo so I can see your coding style.