Skip to content

Reformatted Transpose Matrix Docs #457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/images/baklava-in-c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/baklava-in-every-language.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/baklava-in-kotlin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/binary-search-in-every-language.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/bubble-sort-in-every-language.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/file-io-in-every-language.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/fizz-buzz-in-befunge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/fizz-buzz-in-java.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-algol-68.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-bash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-befunge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-brainfuck.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-c-plus-plus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-c-sharp.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-c-star.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-c.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-crystal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-d.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-dart.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-elixir.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-elm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-every-language.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-go.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-goby.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-google-apps-script.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/hello-world-in-hack.jpg
Binary file modified assets/images/hello-world-in-haskell.jpg
Binary file modified assets/images/hello-world-in-java.jpg
Binary file modified assets/images/hello-world-in-javascript.jpg
Binary file modified assets/images/hello-world-in-julia.jpg
Binary file modified assets/images/hello-world-in-koka.jpg
Binary file modified assets/images/hello-world-in-kotlin.jpg
Binary file modified assets/images/hello-world-in-lisp.jpg
Binary file modified assets/images/hello-world-in-lua.jpg
Binary file modified assets/images/hello-world-in-matlab.jpg
Binary file modified assets/images/hello-world-in-moonscript.jpg
Binary file modified assets/images/hello-world-in-objective-c.jpg
Binary file modified assets/images/hello-world-in-opa.jpg
Binary file modified assets/images/hello-world-in-pascal.jpg
Binary file modified assets/images/hello-world-in-perl.jpg
Binary file modified assets/images/hello-world-in-php.jpg
Binary file modified assets/images/hello-world-in-picolisp.jpg
Binary file modified assets/images/hello-world-in-powershell.jpg
Binary file modified assets/images/hello-world-in-python.jpg
Binary file modified assets/images/hello-world-in-r.jpg
Binary file modified assets/images/hello-world-in-racket.jpg
Binary file modified assets/images/hello-world-in-red.jpg
Binary file modified assets/images/hello-world-in-ruby.jpg
Binary file modified assets/images/hello-world-in-rust.jpg
Binary file modified assets/images/hello-world-in-scala.jpg
Binary file modified assets/images/hello-world-in-scheme.jpg
Binary file modified assets/images/hello-world-in-solidity.jpg
Binary file modified assets/images/hello-world-in-swift.jpg
Binary file modified assets/images/hello-world-in-visual-basic.jpg
Binary file modified assets/images/hello-world-in-wren.jpg
Binary file modified assets/images/linear-search-in-every-language.jpg
Binary file modified assets/images/projects-in-every-language.jpg
Binary file modified assets/images/reverse-a-string-in-c.jpg
Binary file modified assets/images/reverse-a-string-in-every-language.jpg
Binary file modified assets/images/reverse-a-string-in-python.jpg
Binary file modified assets/images/sample-programs-in-every-language.jpg
28 changes: 13 additions & 15 deletions projects/transpose-matrix/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Transpose matrix in Every Language
title: Transpose Matrix in Every Language
layout: default
date: 2020-10-08
last-modified: 2020-10-08
last-modified: 2021-10-06
featured-image:
tags: [transpose-matrix]
authors:
Expand All @@ -16,36 +16,34 @@ to test it.

In linear algebra, the transpose of a matrix is an operator which flips a matrix over its diagonal;
that is, it switches the row and column indices of the matrix A by producing another matrix, often
denoted by Aᵀ. The transpose of a matrix was introduced in 1858 by the British mathematician Arthur Cayley.

The solution can be generated using nested loops and exchanging the indexes of the matrix.

## Requirements

Input:
denoted by Aᵀ. For example, the following matrix could be the matrix A:

| 1 | 2 | 3 |
| - |:-:| -:|
| 4 | 5 | 6 |
| 7 | 8 | 9 |

The following is the expected output:
Once transposed, A becomes the following matrix, Aᵀ:

| 1 | 4 | 7 |
| - |:-:| -:|
| 2 | 5 | 8 |
| 3 | 6 | 9 |

1. The first matrix is from the given input.
2. The second matrix is the desired output i.e, the transpose of the matrix.
The transpose of a matrix was introduced in 1858 by the British mathematician Arthur Cayley.

## Requirements

To execute the program:
For the purposes of this project, we'll ask that you create a program which accepts
a matrix as a list of integers and the dimensions of that matrix in the following
format:

```
transpose.lang 3 3 "1, 2, 3, 4, 5, 6, 7, 8, 9"
transpose-matrix.lang 3 3 "1, 2, 3, 4, 5, 6, 7, 8, 9"
```

Here the first two input numbers indicate the size of the matrix and the next input is the list of numbers to be included in the matrix.
Here, the first two input numbers indicate the column and row size of the matrix, respectively, and the
next input is the list of numbers to be included in the matrix.

## Testing

Expand Down