Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
( Jump to the original submission )
Thanks for the investigation.
This option was added in 2016 by patch #8960 .
Closing report.
Nir, thank you for the information.
The example shows 'nobalance' was implemented.
Now just need the correct people to determine if this bug can be closed.
You can try looking at [1], which gives some examples (involving larger matrices) where balancing influences the answer noticeably.
Also, Octave's current eig function [2] has a test case where balancing changes the answer (albeit probably only by something on the order of roundoff error):
## "balance" is always default ## so the results with and without "balance" should be the same ## while in this case "nobalance" should produce different result %!test %! A = [3 -2 -0.9 0; -2 4 1 -0; -0 0 -1 0; -0.5 -0.5 0.1 1]; %! [V1, D1] = eig (A); %! [V2, D2] = eig (A, "balance"); %! [V3, D3] = eig (A, "nobalance"); %! assert (V1, V2) %! assert (D1, D2) %! assert (isequal (V2, V3), false)
[1] http://www.sci.wsu.edu/math/faculty/watkins/pdfiles/balbad.pdf [2] https://hg.savannah.gnu.org/hgweb/octave/file/tip/libinterp/corefcn/eig.cc
Nir, thank you for your response.
There has been a lot of development in Octave since this bug was created. I thought to test with the provided example.
Is there a better example which the "nobalance" option should be tested against? Where the results for eig() changes.
Your source's understanding of eig is incorrect. 'nobalance' does not affect the returned scaling of the eigenvectors. Accordingly, for your example,
[X,L]=eig(A,'nobalance');disp(X) -0.7071 -0.6000 0.7071 -0.8000
also in Matlab.
As of
version ans = 6.0.90
this is still true.
When doing a doc eig It states there is an option for "nobalance"
The flag balanceOption can be one of: "balance" (default) Preliminary balancing is on. "nobalance" Disables preliminary balancing.
Following slide 6 from: https://www.inf.ed.ac.uk/teaching/courses/cfcs1/lectures/cfcs_l14.pdf
A = [1 3; 4 2]; [X,L]=eig(A) X = -0.7071 -0.6000 0.7071 -0.8000 L = Diagonal Matrix -2 0 0 5
Now testing with "nobalance"
The expected answer
[X,L]=eig(A,'nobalance');disp(X) -1.0000 -0.7500 1.0000 -1.0000
The Matlab function eig() has a 'nobalance' option which does not exist in Octave. There was a GSoC proposal, but looks like this hasn't been implemented?
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 6 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9