//factors of 6a^2 + 3ac clear; clc; close; p=string('6*a^2+3*a*c ') disp('=> 3a(2a+c)')