You can replace B and M with e9 and e6 respectively (scientific notation) using regular expression replacement (regexp) and then convert the resulting strings to a number with str2double.
out = str2double(regexprep(v, {'B', 'M'}, {'e9', 'e6'}, 'ignorecase'))
You can obviously expand this to include any other necessary conversions.
And as an example showing what's happening:
% Convert to scientific notation
B = regexprep(v, {'B', 'M'}, {'e9', 'e6'}, 'ignorecase')
% '12.4e9' '145.3e6' '34.3e6' '1.2e9'
% Convert to numbers
str2double(B)
% 12400000000 145300000 34300000 1200000000