MATLAB: How to merge vector elements into a single number of type double

scalarvector

Hello,
How can I transform this vector:
v=[1 2 3]
into this scalar of type double?:
k=123
Thank you,
Lazaros.

Best Answer

k = polyval(v, 10)
is probably the easiest.
This assume of course that each element of v is an integer in the range [0-9].