answersLogoWhite

0

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.

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

Program for upper triangular matrix in arrays?

#include<stdio.h> int main(){ int a[3][3],i,j; float determinant=0; printf("Enter the 9 elements of matrix: "); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); printf("\nThe matrix is\n"); for(i=0;i<3;i++){ printf("\n"); for(j=0;j<3;j++) printf("%d\t",a[i][j]); } printf("\nSetting zero in upper triangular matrix\n"); for(i=0;i<3;i++){ printf("\n"); for(j=0;j<3;j++) if(i>=j) printf("%d\t",a[i][j]); else printf("%d\t",0); } return 0; }


C program for solving gauss seidal method?

#include<stdio.h> int main() { double matrix[10][10],a,b, temp[10]; int i, j, k, n; printf("Enter the no of variables: "); scanf("%d", &n); printf("Enter the agumented matrix:\n"); for(i = 0; i < n ; i++){ for(j = 0; j < (n+1); j++){ scanf("%lf", &matrix[i][j]); } } for(i = 0; i < n; i++){ for(j = 0; j < n; j++){ if(j>i){ a = matrix[j][i]; b = matrix[i][i]; for(k = 0; k < n+1; k++){ matrix[j][k] = matrix[j][k] - (a/b) * matrix[i][k]; } } } } printf("The Upper triangular matrix is: \n"); for( i = 0; i < n; i++){ for(j = 0; j < n+1; j++){ printf("%.2f", matrix[i][j]); printf("\t"); } printf("\n"); } printf("\nThe required result is: "); for(i = n-1; i>=0; i--){ b = matrix[i][n]; for(j = n-1 ; j > i; j--){ b -= temp[n-j]*matrix[i][j]; } temp[n-i] = b/matrix[i][i]; printf("\n%c => %.2f",97+i, temp[n-i]); } }


Write a programm to check whether a matrix is upper triangular or lower trianglular?

#include<iostream.h> #include<conio.h> # define n 10 void main( ) { int mat[n][n]; int d; // Input elements cout<< "\n Enter dimension of square matrix:"; cin >> d; for(int i = 0; i < d ; i++) for( int j = 0; j < d ; j++) {cout<<"\n Enter elements for "<< i+1 << "," << +1<"location :"; cin >> mat[i][j]; } clrscr(); //Print the array cout<<"\n The Original matrix : \n\n"; for( i = 0; i < d ; i++) {for( j = 0; j < d ; j++) cout<< mat[i][j]<<"\t"; cout<< "\n"; } //upper half of left diagonal..... cout<<"\n The Upper half of the matrix : \n\n"; for( i = 0; i < d ; i++) { for( j = 0; j < d ; j++) { if(i < j) cout << mat [i][j] << " " ; else cout << " " << " "; } cout << "\n "; } //lower half of left diagonal..... cout<<"\n The Lower half of the matrix : \n\n"; for( i = 0; i < d ; i++) { for( j = 0; j < d ; j++) { if(i > j) cout << mat [i][j] << " " ; else cout << " " << " "; } cout << "\n "; } getch ( ); }


Is uppercase used in a C program?

By convention, all upper-case is used to identify macros and single capitals to identify template parameters. However, programmers are free to use upper-case as they see fit.


Write a program using c plus plus to whether the given square matrix is symmetric or not?

int sym_test (const int **a, int n) {int i, j, sym;i=1, j=0, sym=1;while (sym && i

Related Questions

What is the definition of Uper-triangular matrix?

Uper-triangular Matrix A square matrix A whose elements aij=0 for i>j is called upper triangular matrix.


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 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.


The product of two upper triangular matrices is upper triangular?

yes it is


Program for upper triangular matrix in arrays?

#include<stdio.h> int main(){ int a[3][3],i,j; float determinant=0; printf("Enter the 9 elements of matrix: "); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d",&a[i][j]); printf("\nThe matrix is\n"); for(i=0;i<3;i++){ printf("\n"); for(j=0;j<3;j++) printf("%d\t",a[i][j]); } printf("\nSetting zero in upper triangular matrix\n"); for(i=0;i<3;i++){ printf("\n"); for(j=0;j<3;j++) if(i>=j) printf("%d\t",a[i][j]); else printf("%d\t",0); } return 0; }


Determinant of a 4x4 matrix?

The determinant of a 4x4 matrix can be calculated using various methods, including cofactor expansion or row reduction. The cofactor expansion involves selecting a row or column, multiplying each element by its corresponding cofactor, and summing the results. Alternatively, row reduction can simplify the matrix to an upper triangular form, where the determinant is the product of the diagonal elements, adjusted for any row swaps. The determinant provides important information about the matrix, such as whether it is invertible (non-zero determinant) or singular (zero determinant).


C program for solving gauss seidal method?

#include<stdio.h> int main() { double matrix[10][10],a,b, temp[10]; int i, j, k, n; printf("Enter the no of variables: "); scanf("%d", &n); printf("Enter the agumented matrix:\n"); for(i = 0; i < n ; i++){ for(j = 0; j < (n+1); j++){ scanf("%lf", &matrix[i][j]); } } for(i = 0; i < n; i++){ for(j = 0; j < n; j++){ if(j>i){ a = matrix[j][i]; b = matrix[i][i]; for(k = 0; k < n+1; k++){ matrix[j][k] = matrix[j][k] - (a/b) * matrix[i][k]; } } } } printf("The Upper triangular matrix is: \n"); for( i = 0; i < n; i++){ for(j = 0; j < n+1; j++){ printf("%.2f", matrix[i][j]); printf("\t"); } printf("\n"); } printf("\nThe required result is: "); for(i = n-1; i>=0; i--){ b = matrix[i][n]; for(j = n-1 ; j > i; j--){ b -= temp[n-j]*matrix[i][j]; } temp[n-i] = b/matrix[i][i]; printf("\n%c => %.2f",97+i, temp[n-i]); } }


How do you set Matrix B on TI84?

Press 2ND MATRIX (above x-1). Select EDIT at the top with the arrow keys. The select matrix [B] and press ENTER. You can now edit the matrix. (Use the numbers at the upper right to set the size.)


What is a minor diagonal matrix?

A minor diagonal matrix is one where the only non-zero entries are along the diagonal that runs from bottom most left to upper most right.


Are the upper ribs attached to the sacrum?

No, the upper ribs are attached to the thoracic vertebrae in the back, not to the sacrum. The sacrum is a triangular bone at the base of the spine that connects the spine to the hip bones.


Print upper and lower triangle of a matrix?

To print the upper triangle of a matrix, iterate through its rows and columns, printing elements where the column index is greater than or equal to the row index. For the lower triangle, print elements where the column index is less than or equal to the row index. In programming languages like Python, this can be easily achieved using nested loops. For example, for a matrix A, the upper triangle can be printed with for i in range(n): for j in range(i, n): print(A[i][j]), and similarly for the lower triangle.


What 3D shapes have triangular faces?

In geometry, a deltahedron (plural deltahedra) is a polyhedron whose faces are all equilateral triangles. The name is taken from the Greek upper case delta (Δ), which has the shape of an equilateral triangle.