MATLAB: Convert string array to numerical vector

arrayconvertconvertingMATLABnumberstringvector

I have numbers as string array A that I'd like to convert to numerical vector B:
A = ["01";"04";"12"];
B = [1; 4; 12];
I've tried with str2num but it seems to proceed only with string scalars rather than vectors.
Any tips without loop?

Best Answer

A = ["01";"04";"12"];
B = str2double(A)
B = 3×1
1 4 12