Matlab-Matrix Tutorial
Selected Reading
- Matlab Matrix - Discussion
- Matlab Matrix - Useful Resources
- Matlab Matrix - Quick Guide
- Matlab-Matrix - Deletion Row & Coloumn
- Matlab-Matrix - Transpose
- Matlab-Matrix - Rank
- Matlab-Matrix - Trace
- Matlab-Matrix - Inverse
- Matlab-Matrix - Matrix Determinant
- Matlab-Matrix - Subtraction
- Matlab-Matrix - Addition
- Matlab-Matrix - Multiplication
- Matlab-Matrix - Working with Matrices
- Matlab-Matrix - Create Matrix
- Matlab-Matrix - Environment Setup
- Matlab-Matrix - Introduction
- Matlab-Matrix - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Matlab-Matrix - Transpose
Matlab-Matrix - Transpose
The transpose operation switches the rows and columns in a matrix. It is represented by a single quote( ).
Example
Consider following example −
a = [ 10 12 23 ; 14 8 6; 27 8 9] b = a
Output
The execution in MATLAB gives the following output −
>> a = [ 10 12 23 ; 14 8 6; 27 8 9] b = a a = 10 12 23 14 8 6 27 8 9 b = 10 14 27 12 8 8 23 6 9 >>
The transpose() function
You can also make use of the transpose() function to get the transpose of a matrix.
Example
Consider the following example for use of transpose() function −
a = [ 10 12 23 ; 14 8 6; 27 8 9] b = transpose(a)
Output
You will get the following output −
>> a = [ 10 12 23 ; 14 8 6; 27 8 9] b = transpose(a) a = 10 12 23 14 8 6 27 8 9 b = 10 14 27 12 8 8 23 6 9 >>Advertisements