Scan a row and replace any values equal to zero

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 日

0 投票

cA(i+1,cA(i+1,:) == 0) = 1E-07;

その他の回答 (0 件)

タグ

質問済み:

2021 年 10 月 5 日

回答済み:

2021 年 10 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by