Scan a row and replace any values equal to zero

조회 수: 1 (최근 30일)
Robert Demyanovich
Robert Demyanovich 2021년 10월 5일
답변: Voss 2021년 10월 5일
I need to replace any zero values in the columns of a specific row, i +1, of a matrix, cA, with a specific value, say 1E-07. How would I do that?

채택된 답변

Voss
Voss 2021년 10월 5일
cA(i+1,cA(i+1,:) == 0) = 1E-07;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by