Scan a row and replace any values equal to zero

1 view (last 30 days)
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?

Accepted Answer

Voss
Voss on 5 Oct 2021
cA(i+1,cA(i+1,:) == 0) = 1E-07;

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!