main.m136 chars4 lines
The ' symbol in MATLAB syntax is used to denote matrix transpose. Therefore, a' returns the transpose of a. To assign this transpose to a new matrix variable called a_transpose, we simply use the assignment operator =.
To verify that a_transpose is computed correctly, we can display it in the Command Window using the disp() function:
main.m18 chars2 lines
This will display the following output:
main.m57 chars4 lines
Finally, the problem statement states that we need to compute the matrix b, which is the transpose of a. Since we have already computed a_transpose, we can simply assign it to b using the assignment operator =:
main.m17 chars2 lines
Now b contains the transpose of a, just as the problem statement asked. To verify this, we can again display b in the Command Window using the disp() function:
main.m8 chars2 lines
This will display the same output as a_transpose:
main.m57 chars4 lines
gistlibby LogSnag