help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help


From: Jordi Gutiérrez Hermoso
Subject: Re: Please help
Date: Sun, 28 Aug 2011 12:35:21 -0500

On 28 August 2011 10:29,  <address@hidden> wrote:
> Hw do I put in the series with
> 1-(1/3)+(1/5)-(1/7)+(1/9)-...+(1/1001) I dnt knw hw 2 put the
> dots.it says syntax error

Try:

    n = 1001;
    x = sum( (-1).^([1:(n+1)/2]+1)./[1:2:n])

> Sent from my BlackBerry® wireless device

Sent from my Emacs☮ texteditorial device.

HTH,
- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]