I have added a nice MATLAB code for generating Poiseuille flow profiles for non-circular cross sections in the Codes section. Check it out! Hopefully this helps for those trying to implement the algorithm in MATLAB or other languages.
BE MSc PGCert CEng IntPE (Irl) MIEI
BE Mech Eng MSc CEng MIEI
BE MSc PGCert CEng IntPE (Irl) MIEI