octave-maintainers
[Top][All Lists]
Advanced

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

Re: Matlab compatibility or not Matlab compatibility


From: Julien Bect
Subject: Re: Matlab compatibility or not Matlab compatibility
Date: Tue, 16 Feb 2016 08:03:49 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Le 15/02/2016 11:38, Julien Bect a écrit :
Le 12/02/2016 23:51, Sebastian Schöps a écrit :
Here we go:
version
ans =

9.0.0.307022 (R2016a) Prerelease

script_test
x =

    A object: 3-by-4-by-5


ans =

      2


Thank you Sebastian.

So, the conclusion is that Matlab's ndims() function doesn't not respect the size returned by the overloaded size() function...

I still wonder whether we should consider this as a bug in Matlab or as a feature to be reproduced. The documentation suggests the first option:

http://fr.mathworks.com/help/matlab/ref/ndims.html (see More About > Algorithms).

I will check what happens with classdef-style classes (my example was for old-style classes).

Please find attached an extended code snippet that also tests the behavior of classdef-style classes.

On Matlab R2012a the answer is the same : the value returned by size() is not respected by ndims().

Could someone please try and report the result for a more recent release ?

Attachment: essaiOverloadSize.tar
Description: Unix tar archive


reply via email to

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