MATLAB: Simple squaring of expression

MATLABmultiplication

It has been some time since I last used MatLab, and I can't remember how to solve this simple problem. Given the expression:
(1*a+2*b+3*c+4*d+5*e-8)^2
How do you return an answer that actually multiples out the expression and puts like terms together?
I wrote the attached code, but this only returns:
(a + 2*b + 3*c + 4*d + 5*e – 8)^2
syms a
syms b
syms c
syms d
syms e
(1*a+2*b+3*c+4*d+5*e-8)*(1*a+2*b+3*c+4*d+5*e-8)

Best Answer

HI Wesley,
syms a
syms b
syms c
syms d
syms e
f = expand((1*a+2*b+3*c+4*d+5*e-8)*(1*a+2*b+3*c+4*d+5*e-8))