answersLogoWhite

0

#include<stdio.h>

void transpose(int a[50][50]);

void main()

{

int a[50][50],b[50][50],m,n,i,j;

scanf("%d",&m,&n);

for(i=0;i<m;i++)

{

for(j=0;j<n;j++)

{

scanf("%d",&a[i][j]);

}

}

for(i=0;i<n;i++)

{

for(j=0;j<m;j++)

{

scanf("%d",&b[i][j]);

}

}

transpose(a,b,m,n)

void transpose(int a[50][50],int b[50][50],int m,int n)

{

int i;

for(i=0;i<m;i++)

{

for(j=0;j<n;j++)

{

b[i][j]=a[i][j];

}

}

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
BeauBeau
You're doing better than you think!
Chat with Beau
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: Program to find the Transpose of matrix using function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Algebra

What best describes the composition of two functions?

Using the output of first function as the input of the second function.


How do you solve simultaneous equations using matrices?

To solve simultaneous equations using matrices, you first need to represent the equations in matrix form. Create a matrix equation by combining the coefficients of the variables and the constants on one side, and the variables on the other side. Then, use matrix operations to manipulate the matrices to solve for the variables. Finally, you can find the values of the variables by performing matrix multiplication and inversion to isolate the variables.


How do you do rotation in math?

A vector rotation in math is done on a coordinate plane.2D vectors can be rotated using the cross and dot product.3D vectors are rotated using matrix based quaternion math.


Does a sideways parabola represent a function?

No, it does not. You can tell if something is a function or not by using the vertical line test. If there is more than one point at any vertical line, it is not a function.


How do you multiply 3x3 matrices by 1x3 or 3x1?

First of all, if we have any two matrices of sizes mxn and pxq where m, n, p and q are natural numbers, then we must have n=p to be able to multiply the matrices. The result is an mxq matrix. For example, a 3x1 matrix has m=3 and n=1. We can multiply it with any matrix of size 1xq. For example a 2x3 matrix can be multiplied with a 3x1 matrix which has 3 rows and 1 column and the result is a 2x1 matrix. (2x3) multiplies by (3x1) gives a (2x1) matrix. The easy way to remember this is write the dimension of Matrix A and then Matrix B. The two inner numbers must be the same and the two outer numbers are the dimensions of the matrix you have after multiplication. For example Let Matrix A have dimensions (axb) multiply it by matrix B which has dimensions (bxc) = the result is matrix of dimensions ac. Using the trick we would remind ourselves by writing (a,b)x(b,c)=(a,c). This is technically wrong because the numbers are dimensions, but it is just a method to help students remember how to do it. So, a 3x3 matrix can be multiplied by a 3x 1 but not by a 1,3 matrix. How do you do it? Just multiply each entry in the first row of A by each entry in the first column of B and add the products. Do the same for the next row etc. Many (or should I honestly say MOST) people use their fingers and go along row one and then down column one. The add the products of the entries as they do that. Then they do the same for row two and column two etc. It really does help!