bugGNU Octave - Bugs: bug #39562, Package signal, function fwht,...

 
 

bug #39562: Package signal, function fwht, parameter "dyadic" produces wrong result

Submitter:  None
Submitted:  Wed 24 Jul 2013 06:13:48 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  mtmiller
Originator Name:  Alex Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 23 Jan 2014 06:28:29 AM UTC, comment #3: 

This bug has been fixed, the fix will be part of the next signal package release.

http://sf.net/p/octave/signal/ci/320fc1

Mike Miller <mtmiller>
Group Member
Wed 24 Jul 2013 07:29:09 PM UTC, comment #2: 

I attached the output of the Matlab script, but the .mat file itself is identical to what I posted. You should be able to copy and paste the code that I posted into Matlab and it should work. If you want to compare to the attached output file, replace all the plotting commands with:

out = [out1,out2,out3,out4];
save -ascii out.dat out

Anonymous
Wed 24 Jul 2013 06:35:42 PM UTC, comment #1: 

Confirmed that the "dyadic" form is not reversible. I have not compared with Matlab.

Could you attach a mat file from Matlab with the correct values from your example below?

Mike Miller <mtmiller>
Group Member
Wed 24 Jul 2013 06:13:48 PM UTC, original submission:  

The title says everything - Octave produces a result that does not match Matlab or literature values.

Package: signal
Function: fwht, third parameter = "dyadic"

Here is a basic functioning code that exemplifies the problem:

N=1024; t = linspace(-5,5, N);
f=t.**100;

pkg load signal
F =  fwht(f,N,"dyadic"); #<--- "sequency" or "hadamard"
                         #      produces correct results
Finv = ifwht(F,N,"dyadic");

#Normalization for visualization:
out1=t;
out2=abs(F)/norm(F);
out3=abs(Finv)/norm(Finv);
out4=f/norm(f);

plot(t,out4) #original function
hold on;
plot(t,out3) #plot reconstruction: notice that right hand sideof
             #original function is reconstructed completely wrong
hold off;

The same code in Matlab produces a correct result (correct reconstruction, matches literature).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #28652:  out.txt added by None (66KiB - text/plain - output of matlab script - the columns are (out1,out2,out3,out4))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-23 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2013-07-24 None Attached File- Added out.txt, #28652
    2013-07-24 mtmiller StatusNone Confirmed
        Assigned toNone mtmiller

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code