Info

This question is closed. Reopen it to edit or answer.

Looking for documentation explaining M.' and other symbols to select data from an array

2 views (last 30 days)
I have seen the use of this for getting a row from a matrix M.
M. means the same as M(:,:)
I do find documentation on dot notation but still do not understand the use of the last symbol ' here.
Why do you conjugate to find the rows?
And why can I use T=(M.') or T=(M.)' to give me a conjugated matrix and not T=(M.) to give me the matrix itself?
Can somebody please point me to a documentation page where this is explained, where I can find all symbols used to select parts of an array.
Thanks
  1 Comment
Stephen23
Stephen23 on 7 Aug 2020
Edited: Stephen23 on 11 Aug 2020
"M. means the same as M(:,:)"
No.
M. is a syntax error.
M(:,:) is not a syntax error, but serves little point for a matrix it just returns M unchanged.
"And why can I use T=(M.') or T=(M.)' to give me a conjugated matrix"
(M.') returns the array transpose, not the complex conjugate transpose. The parentheses are superfluous.
(M.)' is a syntax error.
So neither of them will "give me a conjugated matrix".

Answers (1)

Star Strider
Star Strider on 7 Aug 2020
M. means the same as M(:,:)
No, not ‘M.’. The extra dot will throw an error.
I am not certain what you are asking. See Special Characters [ ] ( ) {} = ' . ... , ; : % ! @ for a list of them and their explanations.
  3 Comments
Star Strider
Star Strider on 10 Aug 2020
I did not realise that reference changed.
It is more difficult to ask a correct question than to get helpful answers.
No worries. It is not always straightforward to put symbolic concepts into words.
Note that max(), min() and most other functions toat have matrix arguments allow the definition of a dimension argument.
For example:
ColMax = max(M, [], 1); % Maximum Of Each Column (Default, Dimension 1)
RowMax = max(M, [], 2); % Maximum Of Each Row (Dimension 2)
PageMax = max(M, [], 3); % Maximum Across ‘Pages’ (Dimension 3)
.
Stephen23
Stephen23 on 11 Aug 2020
Edited: Stephen23 on 11 Aug 2020
"I was trying to find a matrix notation that works with the functions max() and min()"
"If max(M.') gives me the max value found in each row..."
Rather than transposing and then relying on the default behavior of max (which changes what dimension it operates along depending on the size of the input array) you should specify the dimension to operate over as the third input to max:
max(M,[],2)
This will be more efficient and much more robust.
"And .' or ' simply deliver the same result."
For complex matrices they return different results. It is good practice to stick to using transpose .' unless you specifically need a complex conjugate transpose '

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!