As described in the documentation, str2double interprets the input string in a strict numerical format: see help str2double . There you find the hint, that str2num is more powerful and accepts expressions like "1/2" also.
Nevertheless, take into account that it evaluates even expressions like "!format C:", which would format your harddisk (if modern operating systems would not stop you from doing this...).