MATLAB: Converting specific string variables to double

cell

Dear all,
I have the following matrix
A={'name'
'afsaf'
'sfsfs'
'0'
'rpytui'
'0'
'0'
'0'
'dfgl'
'trd'
};
I want to convert the zeros which are string variables to numeric variables; that is
A={'name'
'afsaf'
'sfsfs'
[0]
'rpytui'
[0]
[0]
[0]
'dfgl'
'trd'
};
Is there a way of doing that?
Thanks in advance!

Best Answer

I knew there was an easier way:
A(ismember(A,'0'))={0}