English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For example, find the transpose matrix for this 3x3 matrix, and print it out.

3 5 6
5 -2 8
1 6 -3

Please include the steps on how to set up a matrix in C program, and then transform it to it's transpose matrix. Thank you! =]

2006-06-09 16:25:38 · 5 answers · asked by Jason L 1 in Computers & Internet Programming & Design

For example, find the transpose matrix for this 3x3 matrix, and print it out.

3 5 6
5 -2 8
1 6 -3

Please include the steps on how to set up a matrix in C program, and then transform it to it's transpose matrix. Thank you! =]

This is my girlfriend's final exam which is due in 15 mins >< please help!

2006-06-09 16:43:24 · update #1

5 answers

using C isn't it?

#include
#include
void main()
{
int i,j,m,n,A[10][10],T[10][10]; /*where m is row, n is column of matrix A of row & column size alloted as 10 each, T assigned the transpose*/
clrscr(); /*To clear up the screen*/
printf("Enter row and column size of a matrix\n");
scanf("%d%d",&m,&n); /*To accept the values of m & n*/
printf("Enter the elements of the matrix\n");
for(i=0;i for(j=0;j scanf("%d",&A[i][j]);
printf("\nThe entered matrix is\n"); /*/Show entered matrix*/
for(i=0;i {
for(j=0;j printf("\t%d",A[i][j]);
printf("\n");
}
for(i=0;i for(j=0;j T[i][j]=A[j][i];
printf("\nThe transpose of the matrix\n");
/*To display the transposed matrix*/
for(i=0;i {
for(j=0;j printf("\t%d",T[i][j]);
printf("\n");
}
getch();
}


when u execute it, here's how it looks..........

Enter row and column size of a matrix
3
3
Enter the elements of the matrix
3
5
6
5
-2
8
1
6
-3

The entered matrix is
3 5 6
5 -2 8
1 6 -3

The transpose of the matrix
3 5 1
5 -2 6
6 8 -3


that's it!

ALL THE BEST!!!!!!

2006-06-13 00:10:21 · answer #1 · answered by chan_l_u 2 · 1 1

Transpose Of A 3x3 Matrix

2017-01-01 06:18:03 · answer #2 · answered by ? 4 · 0 0

Do your own homework. This is a very easy problem and the answer will come to you if you give it some thought.

Hint: the transpose of the matrix you wrote is
[ 3 5 1]
[5 -2 6]
[ 6 8 -3]

2006-06-09 16:34:58 · answer #3 · answered by anonymous 7 · 0 0

i do not comprehend especially the way it truly is performed in C++, yet i'm quite positive you want to make an array of 16 integers for both matrices. Then, you're making an array for the manufactured from both matrices. Make a for loop that multiplies the first integer of the array with the second one one and assign that to the answer array.

2016-11-14 10:11:48 · answer #4 · answered by ? 4 · 0 0

when i want to search for mathematic or operation research ,liking at this site's :
http://www.codersource.net/
http://archive.devx.com/sourcebank/

or search i IBM site, useful thiing you can see there about operating research.

2006-06-09 19:05:03 · answer #5 · answered by Spitrabergâ?¢ 4 · 0 0

fedest.com, questions and answers