help-octave
[Top][All Lists]
Advanced

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

Re: a-b+b != a


From: Mike Miller
Subject: Re: a-b+b != a
Date: Mon, 4 Sep 2017 10:00:08 -0700
User-agent: NeoMutt/20170609 (1.8.3)

On Mon, Sep 04, 2017 at 18:50:29 +0200, stn021 wrote:
> the idea here is to add weights to the result.
> 
> res = y + weights .* ( res-y )
> 
> If weights==1 then res should remain unchanged. Only it doesn't.

If this property is important, then you should probably just add a
special case

    if (weights != 1)
      res = y + weights .* (res - y);
    endif

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

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