Filter löschen
Filter löschen

How i can fix this issue in MATLAB?

1 Ansicht (letzte 30 Tage)
Nisar Ahmed
Nisar Ahmed am 8 Dez. 2021
Kommentiert: Image Analyst am 9 Dez. 2021
Hi,
If I use this command (Phie(isnan(Phie)) = 0.22). It assign every NaN equal to 0.22. Suppose I want assign a range of values say 0.15 - 0.25 instead of single value (0.22).
How can I edit or make a command like Phie(isnan(Phie)) = 0.15 - 0.25. Here Phie is plotted along x axis while say depth is plotted along Y axis.

Akzeptierte Antwort

KSSV
KSSV am 8 Dez. 2021
Bearbeitet: KSSV am 8 Dez. 2021
idx = isnan(Phie) ;
val = linspace(0.15,0.25,nnz(idx)) ;
Phie(idx) = val ;
  6 Kommentare
Nisar Ahmed
Nisar Ahmed am 8 Dez. 2021
alright, thank you for help
Image Analyst
Image Analyst am 9 Dez. 2021
Attach sample input and desired output if you want more help.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by