Vds is a vector of length 51
Notice on the right hand side of the || that Vds is a vector and you are comparing that vector to a scalar. The result would be a vector. The right hand side of the || would be a vector. However, the sides of || must be scalars. You would get away with it in the case that the left side is true. When is the left side true? Well notice the previous test:
Under what circumstances could Vgs(i)<=Vt be false in order to fall into the elseif and yet Vgs(i)>Vt also be false to invoke the right hand side of the || ? The answer is that for any numeric values, Vgs(i)<=Vt and Vgs(i)>Vt cannot be simultaneously be false: the only way you could get to the right side of the || is if one of Vgs(i) or Vt were NaN . So unless you are dealing with NaN, one of the two Vgs(i)<=Vt or Vts(i)>Vt will be true, so the right hand side of the || is not needed and the second elseif are not needed.
Vds is a vector, so your four references to Vds in the expression on the right hand side all force the right hand side to be a vector expression. You cannot store the result of a vector expression into a single scalar.