Dot Operators
Dot (.) operator can be used to multiply (.*
) or divide (./
) two arrays component-wise,
or to raise (.^
) all components of one array.
The two arrays must have the same dimensions.
> a = [1, 2, 3]; > b = [0, 1, 2]; > a .* b > a .^2For example, we can easily evaluate the polynomial function


x = [-2 1 3] y = 3*x.^3 - 5*x.^2 + 2*x + 7Note. In Matlab the function polyval() can be used to evaluate the polynomial.
x = [-2 1 3] c = [3 -5 2 7] y = polyval(c,x)
© TTU Mathematics