octave-maintainers
[Top][All Lists]
Advanced

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

Re: invalid conversion from string to complex N-d array


From: Thomas Weber
Subject: Re: invalid conversion from string to complex N-d array
Date: Thu, 23 Apr 2009 08:26:06 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Apr 22, 2009 at 11:10:46AM +0200, Jaroslav Hajek wrote:
> On Wed, Apr 22, 2009 at 1:13 AM, Judd Storrs <address@hidden> wrote:
> > I'm working on getting the Matlab NIFTI libraries from niftilib.sf.net
> > running under octave. I've been able to isolate a bug as a difference
> > between octave (both 3.0.1 and 3.1.55) and matlab:
> >
> > octave:1> [ '' 65*ones(1,10) ]
> > error: invalid conversion from string to complex N-d array
> > octave:1> [ 65*ones(1,10) '' ]
> > error: invalid conversion from string to complex N-d array
> >
> > But in matlab these succeed:
> >
> >>> [ '' 65*ones(1,10) ]
> >
> > ans =
> >
> > AAAAAAAAAA
> >
> >>> [ 65*ones(1,10) '' ]
> >
> > ans =
> >
> > AAAAAAAAAA
> >
> >
> > --judd
> >
> 
> I checked in the following patch fixing behavior with zero-by-zero matrices:
> http://hg.savannah.gnu.org/hgweb/octave/rev/53364bb317d4
> and this one allowing range->string conversion:
> http://hg.savannah.gnu.org/hgweb/octave/rev/a48c500e48e1
> 
> I think this was, in total, the right thing to do, but I can't check
> with Matlab now. In any case everything seems working.

Test cases for it attached.

        Thomas

Attachment: test.hg
Description: Text document


reply via email to

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