Can I convert a linear vector into a number?

Illustration
Penelope - 2020-12-24T12:53:38+00:00
Question: Can I convert a linear vector into a number?

for example how can i convert a=[5;5;6;7;8] to an b=55678 output?

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

b = str2double(sprintf('%d',a))

Other Way

b = 10.^(numel(a)-1:-1:0)*a


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!