Linear 2 sites Hubbard model with arbitrary potentials

Good day everyone

Am trying to compile a simple Matlab program to solve a Liner 2 sites Hubbard model with arbitrary potential. The model must work out ground state properties, eigenfunctions and site densities. So far am struggling to kick off and need assistance

Thank you
Ephraim