Not Yet Answered # matrix transpose

Ancient Dragon 5,243 Aia 1,977 Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...

Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...

0

first, that function needs to know the size of each matrix -- don't leave any dimensions unspecified as you did. Your function appears to be derived from the bubble sort -- toss it in the bit bin because it will not work. A transpose function does not need a temp variable nor does it swap variables. You need two matrixes where the number of rows and columns in the result matrix are the opposite of the number in the original source matrix. Thus, you can't leave any of the dimensions unspecified.

If you are unsure exactly what **transpore** is, read this tutorial. After you understand that, it should be fairly simple to write the program.

0

```
Given the matrix array:
char matrix[][4] = { 'a', 'b', 'c', 'd',
'e', 'f', 'g', 'h',
'i', 'j', 'k', 'l' };
Transpose means the rows becoming colums and the colums becoming rows.
Calling the first element of the first dimesion subscrit will produce
the first transpose row:
matrix[0][0] 'a'
matrix[1][0] 'e'
matrix[2][0] 'i'
Calling the second element will give us:
matrix[0][1] 'b'
matrix[1][1] 'f'
matrix[2][1] 'j'
The third element of each dimesion is:
matrix[0][2] 'c'
matrix[1][2] 'g'
matrix[2][2] 'k'
And finally the last one:
matrix[0][3] 'd'
matrix[1][3] 'h'
matrix[2][3] 'l'
All this can be accomplished by the use of two for loops
for (colum = 0; colum < reach end colum; colum++)
{
for (row = 0; row < reach end row; row++)
{
printf ("%c ", matrix[row][colum]);
}
putchar ('\n');
}
```

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

Hi. Im using vb 2010. I want to dynamically add textboxes to my form by clicking on a button. I've google searched and so far this code worked:

```
Private Sub btn_addline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addline.Click
Dim txtB1 As New TextBox
Dim i
For i = ...
```