[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help in porting a toolbox
From: |
Mathieu Dubois |
Subject: |
Re: Help in porting a toolbox |
Date: |
Fri, 25 May 2012 07:56:49 +0200 (CEST) |
----- Mail original -----
De: "Jordi Gutiérrez Hermoso" <address@hidden>
À: "Octave-help" <address@hidden>
Envoyé: Jeudi 24 Mai 2012 23:17:57
Objet: Re: Help in porting a toolbox
On 24 May 2012 16:35, Mathieu Dubois <address@hidden> wrote:
> ----- Mail original -----
> De: "Jordi Gutiérrez Hermoso" <address@hidden>
> À: "Mathieu Dubois" <address@hidden>
> Cc: address@hidden
> Envoyé: Jeudi 24 Mai 2012 22:10:09
> Objet: Re: Help in porting a toolbox
>
> On 24 May 2012 15:43, Mathieu Dubois
> <address@hidden> wrote:
>
>> I wanted to port the SOM toolbox (see:
>> http://www.cis.hut.fi/somtoolbox/) to Octave.
> [snip]
>>> I have some problems with code involving (s)scanf. I have read
>>> that there are a lot of differences between Octave and Matlab in
>>> this area. The problematic line can be found in som_read_data.m,
>>> line 225: [s, c, e, n] = sscanf(li, '%s%[^ \t]'); The goal of the
>>> line is to read the header of a file which contains the data
>>> label. The variable li (the line) contains "SepalL SepalW PetalL
>>> PetalW". Under Matlab, s contains "SepalL" (the first label) and
>>> the variable n (which causes the error) contains 8. Under Octave,
>>> s contains the correct value but n is 0.
>
>> What Octave version? I just tried this example but got n = 6, not 0.
>
> I use Octave 3.2.4 (under Ubuntu 11.10).
>Can you try a newer Octave version?
>
>http://www.octave.org/wiki/index.php?title=Octave_for_GNU_Linux:_Binary_Octave_packages_for_GNU_Linux#Unofficial_binaries
I have installed octave 3.6.1 for Ubuntu 11.04 (in fact I'm under 11.04 - I'm
in the process of upgrading to 12.04 :) but it fails to run:
$ octave
octave: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.15' not
found (required by /usr/local/lib/octave/3.6.1/liboctinterp.so.1)
octave: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.15' not
found (required by /usr/local/lib/octave/3.6.1/liboctave.so.1)
octave: /usr/lib/x86_64-linux-gnu/libgfortran.so.3: version `GFORTRAN_1.4' not
found (required by /usr/local/lib/octave/3.6.1/libcruft.so.1)
Any solution?
>>> Is there a way to know you're under octave (something like a
>>> ISOCTAVE variable)? That would be a simple way to write
>>> conditionnal code like
>
>>> if exists('ISOCTAVE')
>>> % Octave specific code
>>> else
>>> % Matlab specific code
>>> end
>
>> If you need to do this, then you have almost surely found an Octave
>> bug. Please report it:
>
>> http://www.gnu.org/software/octave/bugs.html
> I don't do that! I was wondering if it would be a way to work aroud the bug.
> No, yes, *please* report bugs if you find them. We can't make Octave
> better if we don't even know what's wrong with it.
Maybe I have not understood your message. You think it's a bug because we are
supposed to have the same behavior as Matlba, right?
In that case, an if that persists with newer version, I will report it with
pleasure.
- Jordi G. H.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
- Help in porting a toolbox, Mathieu Dubois, 2012/05/24
- Re: Help in porting a toolbox, Mathieu Dubois, 2012/05/24
- Message not available
- Re: Help in porting a toolbox, Jordi Gutiérrez Hermoso, 2012/05/24
- Re: Help in porting a toolbox,
Mathieu Dubois <=
- Re: Help in porting a toolbox, Juan Pablo Carbajal, 2012/05/25
- Re: Help in porting a toolbox, Mathieu Dubois, 2012/05/28
- Re: Help in porting a toolbox, Mathieu Dubois, 2012/05/28
- Message not available
- Re: Help in porting a toolbox, Juan Pablo Carbajal, 2012/05/29