Scan a row and replace any values equal to zero

1 次查看(过去 30 天)
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 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by