Scan a row and replace any values equal to zero

1 vue (au cours des 30 derniers jours)
Robert Demyanovich
Robert Demyanovich le 5 Oct 2021
Réponse apportée : Voss le 5 Oct 2021
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?

Réponse acceptée

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

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by