[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58398] Given an integer matrix, the character
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #58398] Given an integer matrix, the characteristic polynomial has none integer value |
Date: |
Mon, 18 May 2020 22:12:21 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0 |
URL:
<https://savannah.gnu.org/bugs/?58398>
Summary: Given an integer matrix, the characteristic
polynomial has none integer value
Project: GNU Octave
Submitted by: None
Submitted on: Tue 19 May 2020 02:12:20 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: muslim
Originator Email: address@hidden
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
I have a recursive function for constructing a special NxN integer matrix
which contains only 0,1, or -1. (N is even)
function C=getC(N)
if N==2
C=[0,1;-1,-1];
else
Y=zeros(N,N);
Y(1,N)=-1;
Y(N,2)=-1;
Y(N/2, 1)=-1;
Y(2:N-1,2:N-1)=getC(N-2);
C=Y;
end
But when N>=50, poly(getC(N)) will have non integer values.
When N>= 70 , roots(poly(getC(N))) will not equal to eig(getC(N)).
I have tried some other random matrices, but all of them are correct, which
means roots(poly(A)) = eig(A). It seems only my matrix will bring this error.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 19 May 2020 02:12:20 AM UTC Name: main_getC.m Size: 176B By:
None
<http://savannah.gnu.org/bugs/download.php?file_id=49118>
-------------------------------------------------------
Date: Tue 19 May 2020 02:12:20 AM UTC Name: getC.m Size: 164B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=49119>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58398>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58398] Given an integer matrix, the characteristic polynomial has none integer value,
anonymous <=