Possible Duplicate:
convert string to number array in matlab
I have a vector y including values '1' '2' '3' char values and I want to convert it to a corresponding integer vector. If I used str2num it gives 49 50 51 like numbers. How could I do it ?
Subtracts the ASCII value for
'0'from each vector element, taking advantage of the fact that the ASCII values for digits are contiguous.