octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #33518] Lots of major and minor compatibility


From: Arnaud Delorme
Subject: [Octave-bug-tracker] [bug #33518] Lots of major and minor compatibility issues
Date: Sat, 11 Jun 2011 04:18:53 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

URL:
  <http://savannah.gnu.org/bugs/?33518>

                 Summary: Lots of major and minor compatibility issues
                 Project: GNU Octave
            Submitted by: arnodelorme
            Submitted on: Sat 11 Jun 2011 04:18:53 AM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.0
        Operating System: Mac OS

    _______________________________________________________

Details:

I have just ported 50 000 lines of Matlab code to be compabile with Octave.
This is a list of all of the issues I have encountered. I have also
encountered minor problems with the Octave language itself which I will post
in a separate bug.

Congratulation on this project. It took me one week to convert all my code but
it did run in the end.

A. Delorme

1) Dimention missing
P = rand(2,2);
Pori  = mean(P, 3);
crashes if P is only 2 dim (works fine under Matlab)

2) parsing of &&
Matlab treats "&" as "&&" (ignore additional inputs) but Octave does not

3) int2str([]) crashes under Matlab

4) spline: requires at least 3 points udder Octave but not Matlab

5) legendre(2, [0.5 0.5; 0.5 0.5]); % works in Matlab but not in Octave

6) order of variable important for load command
TMPVAR = load(filename, '-mat'); does not work under Octave (but Matlab ok)
TMPVAR = load('-mat', filename); works

7) parsing of cell array (THIS IS A MAJOR ONE AS IT IS QUITE COMMON TO DECLARE
MATRICES IN THIS WAY IN MATLAB)
{ 'test' { 'on' 'off' } } %does not work under octave
{ 'test' { 'on'; 'off' } } %does work

8) use of nargin
if (~nargin) return; end; % crashes under Octave

9) min requires numerical input in Octave but not in Matlab
min(char(1)); % crashes under Octave

10) ismember does not convert logical value to numerical values when
necessary
ismember([0 1], [0 1]); % OK
ismember(2 < 3, [0 1]); % crashes (Matlab OK)

11) std() function cannot process empty entry
std([]) % crashes

12) tmp = strvcat; % return '' under Matlab and crashes under Octave

13) recycle() function missing. A dummy function could be made

14) fopen crashes when only one parameter is given
[IN, message] = fopen(filename); % works under Matlab

15) strread function is very poorly implemented and has multiple issues
including returning different results (and incorrect ones as well) compared to
Matlab
str = '[Common Infos]';
strread(str, '[%s', 'delimiter', ']')
ans = 
    'Common Infos'
(crashes under Octave)

[a,b,c] = strread('1,,2', '%s%s%s', 'delimiter', ',')
(does not return the same result under Octave; under Matlab, the second
element of the cell array is empty (as it should be) whereas under Octave the
third one is empty)

16) lower() on numbers return the identity in Matlab but not in Octave. That's
an important lack of compatibility.
lower([90 100])

17) fread - 'bit24' not recognized under Octave

18) gridadata does not perform automatic transposition of arrays
[Xi,Yi,Zi] =
griddata(rand(1,10),rand(1,10),rand(1,10)',rand(1,100)',rand(1,100));
% this works under Matlab but crashes nuder Octave

19) strmatch cannot process cell array under Octave
 strmatch({ 'a' }, { 'a' 'b' 'c' }, 'exact')
% this works under Matlab but crashes nuder Octave

20) compatibility of the corrcoef function
corrcoef(rand(5,1), rand(5,1))
return 1x1 matrix Octave (2x2 Matlab with 1 in the diagonal)

corrcoef(rand(1,1,10), rand(1,1,10))
% crashes under Octave but work in Matlab





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33518>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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