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

 
 

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

Submitted by:  None
Submitted on:  Wed 24 Jul 2013 06:13:48 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Mike Miller <mtmiller>
Originator Name: AlexOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
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
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Jan 2014 06:28:29 AM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 24 Jul 2013 07:21:51 PM UTCNoneAttached File-=>Added out.txt, #28652
    Wed 24 Jul 2013 06:35:42 PM UTCmtmillerStatusNone=>Confirmed
      Assigned toNone=>mtmiller

    Back to the top


    Powered by Savane 3.1-cleanup1