Use strcmp to test if words match or not:
str = '';
while ~strcmp(str,'quit')
...
str = input('...','s');
end
Do not use == for testing if char vectors are the same: == performs an element-wise comparison, so just like any other element-wise operation both inputs must be the same size or one of them a scalar. In any case, using strcmp is the correct tool for the job.