Squaring a matrix and how the results matters

2 visualizzazioni (ultimi 30 giorni)
az
az il 27 Nov 2018
Commentato: az il 27 Nov 2018
What is the absolute right way to square a metrix: say, A = rand (3,1) and I want absolute value
  1. abs (A' *A)
  2. abs (A)^2
  3. abs ((A).^2)
  4. abs (A .*A)
  5. abs(A*A)
I know sounds sily. just try to be sure. Thanks.

Risposte (1)

madhan ravi
madhan ravi il 27 Nov 2018
  1 Commento
az
az il 27 Nov 2018
Thanks Ravi, I have checked those links. Now I just want to sure what it means in matlab code to square any matrix? Is it just write the matrix side by side, or transpose first one then write side by side and multiply.
If it is a matrix not array.

Accedi per commentare.

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by