[Top][All Lists]

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

[Octave-bug-tracker] [bug #56765] movstd, movvar should accept normaliza

From: Rik
Subject: [Octave-bug-tracker] [bug #56765] movstd, movvar should accept normalization argument for Matlab compatibility
Date: Sat, 17 Aug 2019 15:22:33 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #56765 (project octave):

              Item Group:    Matlab Compatibility => Feature Request        
                  Status:                    None => Confirmed              
                 Release:                   5.1.0 => dev                    
                 Summary: movstd argument-surface incompatible with matlab =>
movstd, movvar should accept normalization argument for Matlab compatibility


Follow-up Comment #1:

he MathWorks often changes the interfaces of their functions.  When Octave
implemented these functions I don't believe movstd and movvar had an
additional argument to indicate the normalization to use.

Since both functions are implemented as m-files, this wouldn't be too hard to
modify.  Probably just extend the input validation to detect whether the
normalization argument is present and then create an anonymous function which
embeds the normalization before calling movfun.  In pseudo-code,

# Validate input and detect normalization
normalization = 1;

# Compute moving variance with 1/N normalization
if (normalization != 0)
  varfcn = @(x) var (x, 1);
  y = movfun (@varfcn, ...);

Might have to extend the anonymous varfcn to include a second argument for
dimension, but maybe not.  Subject to test.


Reply to this item at:


  Message sent via Savannah

reply via email to

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