input() with the 's' option returns a character vector. Character vectors are vectors of characters, where characters are effectively uint16() -- numbers really. So when you use == between a character vector and a constant, you are doing a vector comparison, same as if you had asked
if [114 101 100] == [98 108 97 99 107] %if 'red' == 'black'
which of course is a matrix dimension mismatch.
You need to use strcmp() or strcmpi(), or else you need to switch to using string() objects -- the == operator for string objects does do string comparison.
if 'red' == "black" %double quotes make it a string object