Changed str2num to str2double due to minor data type issues