VERY simple question about adding 2 matrices

Matrix A and B have the same size: 512 x 512 x 105.
I want each element of matrix A to be equal to the corresponding element in matrix B when that element in matrix B is greater than zero.
How can I write this without a for loop?
Thank you very much!!

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

질문:

2014년 3월 17일

댓글:

2014년 3월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by