MATLAB: Loading and removing combined string and number vectors

vector

Hi all,
I have a series of data including strings (e.g. stars) and numbers like below:
A= [*0.29 *0.45 *0.37 *0.56 *0.49 *0.48 *0.45 ];
I want to load vector A and then remove all stars to achive real vector like A2:
A2= [0.29 0.45 0.37 0.56 0.49 0.48 0.45 ];
How can I write this program?
Thanks in advance.

Best Answer

A= '*0.29 *0.45 *0.37 *0.56 *0.49 *0.48 *0.45';
out = str2num(regexprep(A,'\*',''));
OR
out = str2double(regexp(A,'\d*(\.|\d)\d*','match'));