What does it mean by *+ operation

7 Ansichten (letzte 30 Tage)
John ZHANG
John ZHANG am 6 Jun. 2016
Kommentiert: John ZHANG am 6 Jun. 2016
I found someone using *+ in their code, but I don't know what this operation does. For example,
ones(3,3)*+ones(3,3)
yields a 3*3 matrix whose entries are all 3.

Antworten (1)

Steven Lord
Steven Lord am 6 Jun. 2016
In this context + is the unary plus. See the help for uplus. Once MATLAB has applied uplus to the second array, it then performs normal matrix multiplication.
  2 Kommentare
John ZHANG
John ZHANG am 6 Jun. 2016
I have checked the help document but I still don't understand what it says. For example, how does the uplus change the value of ones(3,3)?
John ZHANG
John ZHANG am 6 Jun. 2016
Is there any difference if I use the normal matrix multiplication directly?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by