your script doesn't work for Rs>0 because as soon as Rs is not null, you are attempting to pass a vector and and an implicit function to command plot, where plot expects just 2 vectors, let me explain:
You may just plot with V alone
It works with any value of Rs, but then the X axis labels have to be re-tagged accordingly.
The problem lays in the line previous to plot
Note that you have I on both sides of the equal.
The only way for MATLAB to accept plot(V,I) is to either first solve that equation and pass the solved equation, or correct any possible error like perhaps the equation that you really need is
Where Ic may be a collector current that requires additional equations prior attempting to solve I and then plot.
So omitting I in plot or correcting the I equation you should be able to plot.
Yet, for further assistance, would it be possible for you to show the circuit diagram?
is it a transistor bias that you are modelling? or a diode?
if you find this answer useful would you please be so kind to consider marking my answer as Accepted Answer?
To any other reader, if you find this answer useful please consider clicking on the thumbs-up vote link
thanks in advance