Writing a summation function

I’m fairly new to Octave, and I’m still trying to get an understanding of how the syntax works. I’ll be going back to the online manual after I post this, but I’m hoping someone could explain and perhaps show an example of how I’d enter this problem.

I want to graph each value for the the following equation:
\sum_{n = 1}^{\infty} \frac{-1^{1+n}}{n}

Any suggestions?

I’m not exactly sure if I understand your question correctly. You are only showing a single (infinite) sum and no equation.
I’m assuming that you want to plot the result of that sum for a given upper limit N.
If that is the case, you could do something similar to this:

N = 10;
X = 1:N;
Y = cumsum ((-1).^(1+X) ./ X);
plot (X, Y);