When I try to convert the string 'pi' to a double it gets converted to NaN.
>> str2double('pi')
ans =
NaN
I'm reading a file that contains comma separated values, which might include a multiple of pi. For example (assume pi_in_string was read from a file):
>> pi_in_string = '0,1,-pi/6'
pi_in_string =
0,1,-pi/6
>> split_string = strsplit(pi_in_string, ',')
split_string =
'0' '1' '-pi/6'
>> str2double(split_string)
ans =
0 1 NaN