MATLAB: How to convert a single row matrix into a number (double) helpquestion how to convert a single row matrix into a number (double) for exemple: [1 2 3 4 5] into 12345 Best Answer a=[1 2 3 4 5];b=str2double(sprintf('%d',round(a)));Another method would be to use positional information:a=[1 2 3 4 5];b=sum(a.*10.^((length(a)-1):-1:0));This second method will often work better, but if values larger than 9 are present in a, this will not return the result you might mean. Related SolutionsMATLAB: Converting to a Column Vector A = [ 1 2 3; 4 5 6; 7 8 9 ]A*[100;10;1] MATLAB: Convert the Contents of matrix array (double) to single number (double) Converted_Vect_Time_report = str2double(sprintf('%d',Vect_Time_style)) ; Related QuestionCalendarDuration with a number (double)Hello everyone, help for consolidation of numbersTesting if a input is a numerical (double) of characterQuestion about single digits.How to convert matrix (double) to cell array of stringConverting a Double into a Matrix of its Digits
Best Answer