On Thu, Aug 9, 2012 at 8:46 AM, Andy Buckle <
address@hidden> wrote:
>
>
> On 9 August 2012 13:38, Jordi Gutiérrez Hermoso <
address@hidden> wrote:
>>
>> On 9 August 2012 08:26, Nicholas Jankowski <
address@hidden> wrote:
>> > On Thu, Aug 9, 2012 at 3:22 AM, <
address@hidden> wrote:
>> >> Please assist me to do this:
>> >> Evaluate the series
>> >>
>> >> 1-1/3+1/5-1/7+1/9-...+1/1001
>> >>
>> >
>> > While there may be more elegant ways to do this, you're basically
>> > trying to repeat an addition operation of items with changing value.
>>
>> e.g.
>>
>> sum(1./(1:4:1001) - 1./(3:4:1001))
>>
>> ?
>>
>> - Jordi G. H.
>> _______________________________________________
>> Help-octave mailing list
>>
address@hidden
>>
https://mailman.cae.wisc.edu/listinfo/help-octave
>
>
>>sum(1./(1:4:1001) - 1./(3:4:1001))
> error: operator -: nonconformant arguments (op1 is 1x251, op2 is 1x250)
> error: evaluating argument list element number 1
>>sum(1./(1:4:1001)) - sum(1./(3:4:1001))
> ans = 0.78590
>
> --
> /* andy buckle */