[Top][All Lists]

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

[Octave-bug-tracker] [bug #36778] Problem with matrix access in oct file

From: Sylvain Marchand
Subject: [Octave-bug-tracker] [bug #36778] Problem with matrix access in oct files with versions > 3.4.3
Date: Tue, 03 Jul 2012 16:01:49 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0.1


                 Summary: Problem with matrix access in oct files with
versions > 3.4.3
                 Project: GNU Octave
            Submitted by: zygen
            Submitted on: mar. 03 juil. 2012 16:01:48 GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.2
        Operating System: Mac OS




I encounter memory access problems with Matrix in oct files with octave
versions > 3.4.3.

For example, the following code works with octave 3.4.3, but fails with octave
[built with 'CXXFLAGS=-O2 mkoctfile inspect.cc' on MacOS 10.6.8]

Is this a bug or am I wrong (I have read the docs, the forums, and this code
is quite simple...)?

Thanks in advance.

 Best regards,



#include <octave/oct.h>
#include <octave/parse.h>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <string.h>

using namespace std;

DEFUN_DLD (inspect, args, , "inspect")
  Matrix signal = Matrix (1,2);

  signal(0) = 123.456;

  cout << "Will be displayed..." << endl;

  cout << signal(0) << endl;

  cout << "Will NOT be displayed on recent Octave versions..." << endl;

  return octave_value(0);

// End Of File


Reply to this item at:


  Message posté via/par Savannah

reply via email to

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