What does it mean by *+ operation

조회 수: 9 (최근 30일)
John ZHANG
John ZHANG 2016년 6월 6일
댓글: John ZHANG 2016년 6월 6일
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.

답변 (1개)

Steven Lord
Steven Lord 2016년 6월 6일
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
John ZHANG
John ZHANG 2016년 6월 6일
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 2016년 6월 6일
Is there any difference if I use the normal matrix multiplication directly?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by