Scan a row and replace any values equal to zero

1 Ansicht (letzte 30 Tage)
Robert Demyanovich
Robert Demyanovich am 5 Okt. 2021
Beantwortet: Voss am 5 Okt. 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?

Akzeptierte Antwort

Voss
Voss am 5 Okt. 2021
cA(i+1,cA(i+1,:) == 0) = 1E-07;

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by