[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Evaluating a series
From: |
Sergei Steshenko |
Subject: |
Re: Evaluating a series |
Date: |
Thu, 9 Aug 2012 08:36:07 -0700 (PDT) |
----- Original Message -----
> From: Jordi Gutiérrez Hermoso <address@hidden>
> To: Nicholas Jankowski <address@hidden>
> Cc: Octave users list <address@hidden>
> Sent: Thursday, August 9, 2012 6:27 PM
> Subject: Re: Evaluating a series
>
> On 9 August 2012 10:45, Nicholas Jankowski <address@hidden> wrote:
>> hah... yeah, thought that would get someone up in arms. it would be
>> bigger, uglier, slower, BUT more intelligible and educational to a
>> programming newbie.
>
> For this particular problem, the loopless code is more succinct and
> easier to understand.
>
> And nothing wrong to teach people from the beginning to avoid loopless
> code. That's how it was taught to me, and I think I came out alright.
>
> - Jordi G. H.
Actually, it _is_ wrong to teach people from the beginning loopless code -
because it's much easier for the people being taught to miss the fact that
for n = 1:N
for m = 1:M
...
endfor
endfor
nested loops have O(N * M) computational complexity.
Regards,
Sergei.
- Re: Evaluating a series, (continued)
- Re: Evaluating a series, Nicholas Jankowski, 2012/08/09
- Re: Evaluating a series, Jordi Gutiérrez Hermoso, 2012/08/09
- Re: Evaluating a series, Jordi Gutiérrez Hermoso, 2012/08/09
- Re: Evaluating a series, Andy Buckle, 2012/08/09
- Re: Evaluating a series, Nicholas Jankowski, 2012/08/09
- Re: Evaluating a series, Jordi Gutiérrez Hermoso, 2012/08/09
- Re: Evaluating a series,
Sergei Steshenko <=
Re: Evaluating a series, Francesco Potortì, 2012/08/09
Re: Evaluating a series, Przemek Klosowski, 2012/08/09