Code covered by the BSD License  

Highlights from
Dominant Diagonal

4.0

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

Dominant Diagonal

by

 

16 Jul 2010 (Updated )

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

| Watch this File

File Information
Description

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.

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.

19 Jul 2010 Jan Simon

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.

Updates
20 Jul 2010

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