MATLAB: How can I transform the n monomial of a polynomial into n variables

matlab symbolic polynomial

how can I transform the n monomial of a polynomial into n variables? for example,y=3a+4b+5c;then I want the n monomial stored in n variables,y1=3a;y2=4b;y3=5c; Any help is the most welcome! maxpassion@163.com

Best Answer

syms a b c
y = 3*a+4*b+5*c;
out = fliplr(coeffs(y)).*symvar(y)