octave-maintainers
[Top][All Lists]
Advanced

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

Re: change in polyfit()'s behaviour?


From: Thomas Weber
Subject: Re: change in polyfit()'s behaviour?
Date: Sun, 4 Jan 2009 12:19:39 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Sat, Jan 03, 2009 at 01:51:32PM -0500, Ben Abbott wrote:
>
> On Jan 3, 2009, at 1:28 PM, Thomas Weber wrote:
>
>> On Sat, Jan 03, 2009 at 01:04:52PM -0500, Ben Abbott wrote:
>>>
>>> On Jan 3, 2009, at 11:47 AM, Thomas Weber wrote:
>>>
>>>> Hi,
>>>>
>>>> the following raises in error in the 3.0 branch:
>>>>    
>>>>    polyfit ([1,2; 3,4], [1,2; 3,4],4)
>>>> namely
>>>> error: polyfit: x and y must be vectors of the same size
>>>>
>>>> In fact, this error is part of test_poly.m in the test/  
>>>> subdirectory.
>>>>
>>>>
>>>> In the development sources, the test has been removed and the output
>>>> is
>>>> now:
>>>>
>>>> octave:1> polyfit ([1,2; 3,4], [1,2; 3,4],4)
>>>> ans =
>>>>
>>>>  0.011358  -0.113585   0.397547   0.432076   0.272603
>>>>
>>>> Is this change intentional, ie should polyfit handle matrices as  
>>>> input
>>>> arguments?
>>>>
>>>>    Thomas
>>>
>>> It is compatible behavior, so it should accept matrices, provided  
>>> they
>>> are the same size.
>>
>> Ah, okay. I wonder whether this behaviour is intentional, though.
>
> My memory is that it was intentional on our part (or at least mine).

I was being unclear. I wonder if this behaviour is intentional on
Matlab's part. Their documentation only mentions vectors and the error
messages (for different sizes) talks about vectors of the same size.

> The discussion the this changeset is below. Ironically, you led it off 
> ;-)

Yes, but I was only the messenger there.

        Thomas


reply via email to

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