MATLAB: How to extract a number from a string array
extract numbersstr2double
I have a string array of values that look like this: "(164)– (165)" "(165)– (166)" "(165)– (166)" How can extract the first three digit value only so that I get a matrix that is 164 165 165
Best Answer
"How can extract the first three digit value only so that I get a matrix that is 164 165 165"
With a simple application ofregexp andstr2double:
>> C = {'(164) - (165)','(165) - (166)','(165) - (166)'};
Best Answer