[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51092] mldivide returns wrong matrix size if
From: |
Alois Schlögl |
Subject: |
[Octave-bug-tracker] [bug #51092] mldivide returns wrong matrix size if X contains NaN |
Date: |
Tue, 23 May 2017 03:55:52 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.gnu.org/bugs/?51092>
Summary: mldivide returns wrong matrix size if X contains NaN
Project: GNU Octave
Submitted by: schloegl
Submitted on: Tue 23 May 2017 07:55:51 AM UTC
Category: Octave Function
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: 4.2.1
Operating System: GNU/Linux
_______________________________________________________
Details:
This is example is ok,
N=1000;D=randn(N,3);C=rand(N,1)>.9;[size(D);size(C);size(D\C);size(mldivide(D,C))]
but when D contains some NaN, the size of the results matrix is wrong.
N=1000;D=randn(N,3);C=rand(N,1)>.9;D(10,:)=NaN;[size(D);size(C);size(D\C);size(mldivide(D,C))]
warning: matrix singular to machine precision
warning: matrix singular to machine precision
ans =
1000 3
1000 1
3 1000
3 1000
Although the content might not be meaningful, I would expect that the matrix
size would be the same. I checked also with matlab, and this behaviour is
incompatible with it (matlab returns the correct size).
In octave, it also seems to make a difference whether the NaN is in the first
column, or only some other column:
N=1000;D=randn(N,3);C=rand(N,1)>.9;D(10,1)=NaN;[size(D);size(C);size(D\C);size(mldivide(D,C))]
warning: matrix singular to machine precision
warning: matrix singular to machine precision
ans =
1000 3
1000 1
3 1000
3 1000
N=1000;D=randn(N,3);C=rand(N,1)>.9;D(10,2)=NaN;[size(D);size(C);size(D\C);size(mldivide(D,C))]
** On entry to DLASCL parameter number 4 had an illegal value
error: exception encountered in Fortran subroutine dgelsd_
N=1000;D=randn(N,3);C=rand(N,1)>.9;D(10,3)=NaN;[size(D);size(C);size(D\C);size(mldivide(D,C))]
** On entry to DLASCL parameter number 4 had an illegal value
error: exception encountered in Fortran subroutine dgelsd_
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51092>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51092] mldivide returns wrong matrix size if X contains NaN,
Alois Schlögl <=