MATLAB: Displaying (small number)*(syms variable) as 0

decimalformatMATLABsymbolic

This is an arbitrary example representing my problem
syms x;
a=0;
b=pi/2;
c=x;
R=[cos(a)*cos(b)*cos(c) sin(a)*sin(b)*sin(c)];
vpa(R)
This outputs:
ans =
[ 6.1e-17*cos(x), 0]
Because pi isn't exact in Matlab, then cos(pi/2) isn't exactly zero as sin(0) is, which leads to the first element in ans to be written as such, and the second element to be written exactly 0;
I've tried "digits" before vpa, "format long", changed format in preferences, but none works.
How can I edit my code such that the first element is displayed as exactly 0?

Best Answer

syms x;
a=0;
b=sym(pi)/2;
c=x;
R=[cos(a)*cos(b)*cos(c) sin(a)*sin(b)*sin(c)];
vpa(R)
ans =