A stem plot is for discrete time points, by its very nature. Indeed, all plots are discrete at some level. Your loop is in time steps of 0.1, so your plot is discretized to that level by necessity. So I'm not sure what you mean by your question about getting a continuous signal.
As for the error you were getting, MATLAB interprets v(t) as an indexing into the array v. Specifically, you're asking for the t-th element of v. That means MATLAB expects a positive integer for t. v(3) = sin... means "set the third element of v to be [whatever sin... turns out to be]". But you were looping over values of t in steps of 0.1, so v(t) was things like v(1.1), v(1.2), etc. You can't access the 1.1th element or 1.2th element of v.
Junaid's solution uses an integer counter, index. Walter's solution loops over the variable t which takes integer values.
There is a way to index based on a condition, rather than an index number. It's called logical indexing and would actually enable you to avoid the loop altogether:
t = 1:0.01:2*pi;
y = 0.1*sin(t);
y(t >= pi) = 0;
The third line uses a logical index to extract the values of y under a given condition -- t >= pi -- and changes them to be 0.
Finally, you might want to use the linspace function, rather than t = 1:0.1:2*pi, if you want a value of t at 2*pi. Using the colon means that the last value of t will be the nearest multiple of 0.1 no greater than 2*pi. (Because 2*pi is irrational, the last value will therefore be less than 2*pi.)