answersLogoWhite

0


Best Answer

You initially assume that the first number you want to compare is the maximum. Call this "maximum", for example. Then you iterate through all the other numbers you want to compare, and if you find a number that is larger than "maximum", copy this number to "maximum".

To iterate through all the elements of a matrix, you have to use two "for" loops with indices, which are traditionally called "i" and "j". To restrict to an upper triangle for example, you need to calculate the corresponding range for the indices.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find the maiximum number in upper and lower triangle of a matrix in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is strictly lower triangular matrix?

A strictly lower triangular matrix is a kind of (lower) triangular matrix. Term "lower" implies matrix has elements only in the lower half. The condition "strictly" implies that even the "diagonal" of such lower triangular matrix is populated with '0's. The strictly lower triangular matrix thus has '0's in its diagonal as well as the upper triangle part. In other words, a strictly lower triangular matrix is a lower triangular matrix minus its diagonal.


Definition of Lower-triangular matrix?

Lower-triangular Matrix A square matrix A whose elements aij=0 for i


What is the definition of a diagonal matrix?

Diagonal Matrix A square matrix A which is both uper-triangular and lower triangular is called a diagonal matrix. Diagonal matrix is denoted by D.


Wap to build a sparse matrix as an arraywrite functions to check if the sparse matrix is a square diagonal or lower triangular or upper triagular or tridiagonal matrix?

write a programe to build a sparse matrix as an array. write function to check if the sparse matrix is a square, diagonal,lower triangular, upper triangular or tridiagonal matrix


What conditions must exist for pascal's principle to be true?

In the pascals triangle the upper two numbers must add up to the middle lower number.


C program for upper triangular matrix for a given matrix?

This sounds very much like a homework problem. If you work on it and get started, you found a great place to ask a specific question. However, this is not a place to have your homework done for you.


How to find the inverse of a symmetric matrix?

You can factorize the matrix using LU or LDLT factorization algorithm. inverse of a diagonal matrix (D) is really simple. To find the inverse of L, which is a lower triangular matrix, you can find the answer in this link.www.mcs.csueastbay.edu/~malek/TeX/Triangle.pdfSince (A T )-1 = (A-1 )T for all matrix, you'll just have to find inverse of L and D.


How to find the inverse of a square matrix?

You can factorize the matrix using LU or LDLT factorization algorithm. inverse of a diagonal matrix (D) is really simple. To find the inverse of L, which is a lower triangular matrix, you can find the answer in this link.www.mcs.csueastbay.edu/~malek/TeX/Triangle.pdfSince (A T )-1 = (A-1 )T for all matrix, you'll just have to find inverse of L and D.


How to find the Inverse of a square symmetric matrix?

You can factorize the matrix using LU or LDLT factorization algorithm. inverse of a diagonal matrix (D) is really simple. To find the inverse of L, which is a lower triangular matrix, you can find the answer in this link.www.mcs.csueastbay.edu/~malek/TeX/Triangle.pdfSince (A T )-1 = (A-1 )T for all matrix, you'll just have to find inverse of L and D.


What is the third length of a triangle with 5ft and 12ft?

Any number between 8-16 If you do 12+5=17 the other side can't be 17 because then the triangle would be flat so it's any number lower than 17. Also, 12-5= 7. Again, 7 can't be the third side of this traingle because it would make the triangle flat. so any number higher than 7 would work.


What is the triangle shaped farmland in lower Egypt called?

Its called a delta I think


What is the most actively growing portion of a nail?

The most active growing portion of the nail is the Lunula. The Lunula is the white lower part of your nail closest to your skin.