View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Dominant Diagonal

4.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 1.87 KB File ID: #28225 Version: 1.3

Dominant Diagonal


T. R. (view profile)


16 Jul 2010 (Updated )

The input matrix is tested in order to know of its diagonal is dominant.

| Watch this File

File Information

The input matrix is tested in order to know of its diagonal is dominant.

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
20 Jul 2010 T. R.

T. R. (view profile)

Thank you for your comment Jan.
I wrote this some time ago and failed to optimize the code for fast/clean execution before submitting.
I will update this submission with your suggested improvements.

Comment only
19 Jul 2010 Jan Simon

Jan Simon (view profile)

Help section with input, output, example, author and date. H1-like line not in the needed position to support LOOKFOR. Error checking of inputs. Useful and usable.
The efficiency could be remarkably increased by vectorizing the 2 FOR loops:
absDiag = abs(diag(A));
flag = all(sum(abs(A), 2) - absDiag < absDiag);
Then flag is a LOGICAL and not a DOUBLE.

20 Jul 2010 1.3

H1 is now in the correct position.
More efficient (vectorized) implementation.
Output is now returned as LOGICAL.
Input can now be tested for diagonal dominance or strict diagonal dominance.

Contact us