If this is the expression you're using
f = @(I2,V) (I_p - I_o*(exp((V+R_s*I2)./V_t)-1) - V + R_s*I2/R_sh)/I2;
I1(k) = fzero(@(I2) f(I2, V(k)),0);
Then zero isn't a useful initial guess for the solver. You're trying to divide by zero. Pick a different initial guess. If you really want to stay close to zero, you can use eps instead of zero.