add script to generate matrix a & b