octave-maintainers
[Top][All Lists]
Advanced

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

Re: conv.m and MATLAB incompatibility.


From: Robert T. Short
Subject: Re: conv.m and MATLAB incompatibility.
Date: Mon, 29 Jun 2009 06:25:26 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.22) Gecko/20090606 SeaMonkey/1.1.17

Schirmacher, Rolf wrote:
  
-----Original Message-----
From: Robert T. Short [mailto:address@hidden]
Sent: Sunday, June 28, 2009 6:34 PM
To: octave maintainers list
Subject: conv.m and MATLAB incompatibility.


Attached is a patch to conv.m that fixes a MATLAB incompatibility.  I 
also added a couple of tests.

Summarizing:  if the input vectors are the same length, but 
one is a row 
vector and the other is a column vector, the octave version 
returns the 
correct answer but with a different orientation than MATLAB.  
In other 
words octave will return a row vector when MATLAB returns a column 
vector and octave will return a column vector when MATLAB 
returns a row 
vector.


WARNING.  APPLYING THIS PATCH COULD CAUSE SCRIPT BREAKAGE!

Scripts that depend on the row/column nature of the result will no 
longer work.  This might be a good reason not to apply this patch.  
Folks (like me) that want MATLAB compatibility can keep this 
version in 
their path.

Bob


    

As I had some issues with this earlier (incompatibility as described above)
I would strongly favour to apply the patch although there is the "risk" to
break scripts. Otherwise we would have to continue with the incompatibility,
probaby causing even more trouble with new users and compatibility in the
future...

Just my 2 ct,

Rolf 


  
Actually, it used to be worse.  conv.m used to return row vectors regardless of the orientation of the input.  Looking through the logs, Ben fixed that several months ago.  The problem this patch fixes is really a corner case that didn't get fixed by Ben's patch.

Wonder if deconv.m has the same problem?  I will look when I have a few minutes.

Mind you, MATLAB's behavior is a little goofy, but it is what it is.

Bob

reply via email to

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