[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51583] eig(L, 'vector') fails on Octave - wor
From: |
Tom |
Subject: |
[Octave-bug-tracker] [bug #51583] eig(L, 'vector') fails on Octave - works on Matlab |
Date: |
Wed, 26 Jul 2017 07:50:49 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
URL:
<http://savannah.gnu.org/bugs/?51583>
Summary: eig(L,'vector') fails on Octave - works on Matlab
Project: GNU Octave
Submitted by: madtom1999
Submitted on: Wed 26 Jul 2017 11:50:48 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: GNU/Linux
_______________________________________________________
Details:
The following code works fine on Matlab but fails on Octave:
-----------------------------------------------------------
% Form the matrix of weights based on the graph
N = 11;
W = zeros(N,N);
W(1,2) = 0.5;
W(1,5) = 0.5;
W(2,3) = 0.6;
W(3, 4) = 0.6;
W(4,5) = 0.6;
W(4,6) = 0.1;
W(5, 7) = 0.2;
W(6,7) = 0.8;
W(7,8) = 0.4;
W(8,9) = 0.5;
W(9,10) = 0.7;
W(10,11) = 0.7;
W(11,6) = 0.8;
% Since it's undirected add on the transpose to assign the edges in the
% other direction
W = W + W';
% Examine the structure of the weights matrix
spy(W)
% Form the degree matrix, D
D = diag(sum(W,2));
% Form the Laplacian
L = D - W;
% Find the eigenvectors and eigenvalues
[evec,eval] = eig(L, 'vector');
error: eig: wrong type argument 'sq_string'
---------------------------------------------
using [evec,eval] = eig(L, "vector");
error: eig: wrong type argument 'string'
---------------------------------------------
Tom
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51583>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51583] eig(L, 'vector') fails on Octave - works on Matlab,
Tom <=