Scan a row and replace any values equal to zero

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

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

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by