MATLAB Answers

# Determining the number of rows or columns of a lower triangular matrix, maintaining constant diagonal coefficients

1 view (last 30 days)
GS76 on 17 Jan 2020
Commented: GS76 on 19 Jan 2020
Hi all,
This problem has stumped me due to my insufficient mathematical knowledge.
I am looking to determining the number of rows or columns of a lower triangular matrix, maintaining constant diagonal coefficients, for the minimum condition number.
Please see the attached PDF which describes what I am trying to do.
The best I have come up with is to check 5 different matrices, each with its number of rows/columns (solved using the finite element method to determine the number of steps {rows/columns}). I have attached the MAT files for these values for each matrix.
I did this with the following code. I then compare it manually.
% Diagonal elements of the "a" calibration matrix.
a_pn_d=diag(aij,0);
% Maximum and minimum diagonal elements of the "a" calibration matrix.
a_pn_d_max=max(a_pn_d);
a_pn_d_min=min(a_pn_d);
% Ratio of the minimum to maximum diagonal elements of the "a" calibration
% matrix.
a_pn_d_R=a_pn_d_min/a_pn_d_max;
% Relative error of each row.
a_sum=sum(aij,2);
a_sd=a_sum./a_pn_d;
% Condition number with a p-norm of 1, for the "a" calibration matrix.
% https://blogs.mathworks.com/cleve/2017/07/17/what-is-the-condition-number-of-a-matrix/#a3219326-029f-4d0b-bf53-12917948c5f2
a_cond_1=cond(aij,1);
Is there a method to optimise this problem, looking for the number of steps (rows/columns) of a lower triangular matrix, while maintaining constant diagonal coefficients as well as the minimum condition number for the matrix?
I am open to any suggestions and/or assistance in this regard.

#### 2 Comments

GS76 on 17 Jan 2020
I hope this example helps with my question.
Marked in "yellow". The diagonal coefficients should be constant or as close as possible.
The condtion number for this matrix is 51.3.
GS76 on 17 Jan 2020
The condition number is determined in relation to the all the matrix coefficients and the diagonal coefficients, as follows:

Sign in to comment.

### Accepted Answer

GS76 on 19 Jan 2020
I have the following code for the above equation, but I do not think it is right as the answer is large.
I have attached the *.mat for reference.
Any assistance would be much appreciated.
% Condition number for the optimal distribution of the hole-drilling depth increments, base on the "Integral Method" for the non-uniform hole-drilling residual stress measurement technique
% Determination of the condition number for the optimal distribution of the hole-drilling depth increments,
% base on the "Integral Method" for the non-uniform hole-drilling residual stress measurement technique.
% The following equation as referenced from this source (see below) is used
% for this determination.
% https://link.springer.com/article/10.1007/BF02331114
% Develop the terms of the equation
% The individual terms of the equation will be developed individually and then brought together.
% Loading the files
% Loading the required variables.
% Loading of the required *.mat file and then the variable.
anp = load("191231_GS_0295_10.mat","aij");
aij = anp.aij
% Length of array
N = length(aij)
% Summation of matrix
aij_2 = aij^2
y1 = sum(aij_2(:))
% Product of the matrix
aii = diag(aij)
aii_2 = aii.^2
% Product of the square of the diagonal of the matrix
y2 = 4*prod(aii_2,"all")
% The complete equation is as follows:
K_A = (y1 + (y1.^2-y2).^0.5)./y2

#### 1 Comment

GS76 on 19 Jan 2020
Based on the above I thought it is best to ask this question seperately, as I had deviated from the original question above.
The question is at the following link:

Sign in to comment.

### More Answers (0)

Sign in to answer this question.

R2019b

Translated by