There is no reason why S should be a cell array. The last two lines should simply be
Make it just a normal numerical array (double). Then try this:
sorted_s = sort(s(:), 'ascend');
[rows1, columns1] = find(s == sorted_s(1))
[rows2, columns2] = find(s == sorted_s(2))
[rows3, columns3] = find(s == sorted_s(3))
I really don't know what you're doing with bsxfun, q, kevin, and all that. I urge you to avoid cell arrays unless they're really necessary such as when you have collections of different length strings, or collections of variables where the type of the variable (char, integer, structure, etc.) varies on a element by element basis.
Best Answer