Rik | 1 May 2011 18:19
Picon

[bug #33178] Wrong construction of a struct array

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

Update of bug #33178 (project octave):

                Category:                    None => Interpreter            
                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

Confirmed on a recent tip of the development branch (9bfc37e699da). 
Additional information which may help is that the first and last elements of
the struct array are correctly initialized but the range in between is not. 
For the example posted, A(1) and A(5) are okay while A(2:4) are not.

    _______________________________________________________

Reply to this item at:

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

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

anonymous | 2 May 2011 06:44
Picon

[bug #33197] sortrows does not work with single row arrays

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

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

                 Summary: sortrows does not work with single row arrays
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 02 May 2011 04:44:22 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: asppsa
        Originator Email: asppsa@...
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Hello,

(Continue reading)

Simon Waid | 2 May 2011 15:01
Picon

[bug #33204] .tex file generated with print('-depslatex') lacks $ for tex fomulas

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

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

                 Summary: .tex file generated with print('-depslatex')  lacks
$ for tex fomulas
                 Project: GNU Octave
            Submitted by: chili
            Submitted on: Mon 02 May 2011 01:01:02 PM GMT
                Category: Plotting with gnuplot
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

How to reproduce:
(Continue reading)

Marco Caliari | 2 May 2011 15:04
Picon

[bug #33197] sortrows does not work with single row arrays

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

Follow-up Comment #1, bug #33197 (project octave):

I confirm the problem.

When you call sortrows with a row as first argument and a scalar as second
argument, then sort_rows_idx in ov-base-scalar.h is called, which gives an
empty vector 1x0 as output. I don't know if there is a reason for that. I can
fix the problem if I replace

return Array<octave_idx_type> (dim_vector (1, 0));
-verbatim

with

Array<octave_idx_type> idx;
idx.resize (dim_vector (1, 1));
idx(0) = 0;
return idx;

which is somehow similar to the result of sort some lines above. But maybe it
is safer to modify sortrows.m with something like

if (rows (A) == 1)
  i = 1;
elseif (issparse (A))
  ...
(Continue reading)

Marco Caliari | 2 May 2011 15:07
Picon

[bug #33197] sortrows does not work with single row arrays

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

Follow-up Comment #2, bug #33197 (project octave):

I can fix the problem if I replace

return Array<octave_idx_type> (dim_vector (1, 0));

with

Array<octave_idx_type> idx;
idx.resize (dim_vector (1, 1));
idx(0) = 0;
return idx;

which is somehow similar to the result of sort some lines above. But maybe it
is safer to modify sortrows.m with something like

if (rows (A) == 1)
  i = 1;
elseif (issparse (A))
  ...

Marco

    _______________________________________________________

Reply to this item at:
(Continue reading)

Søren Hauberg | 2 May 2011 17:29
Picon

[bug #33208] Texinfo requires no spaces in the beginning of lines

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

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

                 Summary: Texinfo requires no spaces in the beginning of lines
                 Project: GNU Octave
            Submitted by: hauberg
            Submitted on: Mon 02 May 2011 05:29:28 PM CEST
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: Søren Hauberg
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Hi

(Continue reading)

John W. Eaton | 2 May 2011 17:45
Picon

[bug #33208] Texinfo requires no spaces in the beginning of lines

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

Follow-up Comment #1, bug #33208 (project octave):

When Octave generates the scripts/DOCSTRINGS file, it strips out leading
comment characters and the first space (if any).  See the scripts/gethelp.cc
program.

I don't think you want to strip out all leading spaces because doing that will
screw up any by-hand formatting in  <at> verbatim blocks.  It seems simpler to me
to impose a one-space-is-discarded rule on docstring authors rather than
trying to make the code too complex to solve a problem that can just be
avoided by following some fairly simple rules.

    _______________________________________________________

Reply to this item at:

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

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

Jochen Weber | 2 May 2011 18:59
Favicon

Suggested additions for compatibility list (Mac OSX version 3.4.0)

Hello there,

First of all, I do hope this is sent to the correct address. If not, please either forward to the intended recipient (maintainer of Octave-Matlab compatibility issues list) or reply with more information; thank you!

I am developing a toolbox for Matlab (see http://neuroelf.net/ if interested), and while I am aware that not the entire functionality will work in Octave (particularly the GUI components, I assume), I would like users who are familiar with working in a  command line/prompt style environment to use as much of the functionality of my toolbox as possible, even without a Matlab license, for which Octave is the logical choice.

I only just started testing my code in Octave, and I already found several problems (and workarounds):

* cell2struct does not work with an empty cell (actually crashes Octave! i.e. to define a 0x0 struct with fieldnames set as an initialization for later use and ensuring all fieldnames are in their proper order); workaround: user defined function (attached) that depending on output of version('matlab') uses cell2struct or creates the struct as 1x1 and then removes the only element with s(:) = [];
* catch EXPRESSION does not work (as in try, TRYBLOCK; catch EXCEPTION, CATCHBLOCK; end); workaround, use an identifier (e.g. ne_eo), and define a function (attached) with the body "assignin('caller', 'ne_eo', lasterror);", which will never be called in Matlab but only in Octave
* transpose operator (') does not work for 1x1 struct arrays (which really is a strange bug! I'm using the syntax VARIABLE(:)' in some places in the code to ensure that the input can be used in a for ELEMENT = VARIABLE, CODE, end construction)
* the logical function does not support inputs of type uintXX/intXX, which again I think is a little odd...; workaround: use logical(double(VARIABLE));

Minor issues:

* the auto-complete (tab) key (at least on my Macs, OS 10.6), tend to do strange stuff when used with file or foldernames (e.g. when typing addpath followed by an absolute foldername, it does not correctly resolve subfolders, etc.), this is also true for the return value of fieldnames(OBJ) when used on a user defined object

I am likely to find additional problems and would appreciate if those would be taken care of in future versions :)

Best,
/jochen

--
Jochen Weber
Chief Software Engineer
NeuroElf.net

444 Manhattan Avenue, Apt. 7F
New York City, NY-10026
USA

em: info-P8xZOGJO1iTk1uMJSBkQmQ@public.gmane.org
ph: +1-773-818-2561
gv: +1-773-234-8079


Attachment (emptystruct.m): application/octet-stream, 2851 bytes
Attachment (ne_eo.m): application/octet-stream, 1986 bytes
_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://mailman.cae.wisc.edu/listinfo/bug-octave
Daryl Lee | 3 May 2011 00:38
Picon

[bug #33211] Standalone path is empty

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

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

                 Summary: Standalone path is empty
                 Project: GNU Octave
            Submitted by: daryllee
            Submitted on: Mon 02 May 2011 06:38:06 PM EDT
                Category: Configuration and Build System
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Installation
                  Status: None
             Assigned to: None
         Originator Name: Daryl Lee
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.4
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

When building a standalone app, value returned by "path" is ".", instead of
the full Octave path when the same command is run in the Octave interpreter
console.  The gcc-MinGW is version 4.4.0, running on a Win7 64-bit machine. 
For full details, see the thread at
https://mailman.cae.wisc.edu/pipermail/help-octave/2011-May/045726.html.

    _______________________________________________________

Reply to this item at:

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

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

anonymous | 3 May 2011 15:43
Picon

[bug #33216] cell2struct does not allow to create an empty struct

Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only
notification stream.  Info posted to this mailing list address won't appear in the tracker database where
it is most useful.

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

                 Summary: cell2struct does not allow to create an empty struct
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 03 May 2011 01:43:24 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Improvement/Optimization
                  Status: None
             Assigned to: None
         Originator Name: Jochen Weber
        Originator Email: info@...
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.0
        Operating System: Mac OS

    _______________________________________________________

Details:

In many of my codefiles I'm currently using the following syntax to produce a
0x0 struct with a fix set of fields (against which I later run checks) but no
content (no memory required for pointers, etc.):

init_struct = cell2struct(cell(0, 0, 2), {'field1', 'field2'}, 3);

In Matlab this works as expected:

 - taking the dims of the first input that are not the fieldnames dim (0 and
0) as output dims
 - and then creating the output struct with the requested fields

As a workaround I'm currently using a function to initialize structs:

function s = emptystruct(fields, dim)

% argument check
if nargin < 1 || ...
   ~iscell(fields)
    error( ...
        'neuroelf:BadArgument', ...
        'Bad or missing argument.' ...
    );
end
if nargin < 2 || ...
   ~isa(dim, 'double') || ...
    numel(dim) < 2 || ...
    numel(dim) ~= size(dim, 2) || ...
    any(isinf(dim) | isnan(dim) | dim < 0 | dim >= 2^31 | dim ~= fix(dim))
    dim = [0, 0];
end
dim0 = (prod(dim) == 0);

% create struct
if numel(fields) == 0;
    s = struct;
else
    s = cell2struct(cell(numel(fields), 1), fields(:)', 1);
end
if dim0
    s(:) = [];
    if any(dim > 0)
        s = reshape(s, dim);
    end
else
    s = repmat(s, dim);
end

    _______________________________________________________

Reply to this item at:

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

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


Gmane