How i can fix this issue in MATLAB?

1 vue (au cours des 30 derniers jours)
Nisar Ahmed
Nisar Ahmed le 8 Déc 2021
Commenté : Image Analyst le 9 Déc 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.

Réponse acceptée

KSSV
KSSV le 8 Déc 2021
Modifié(e) : KSSV le 8 Déc 2021
idx = isnan(Phie) ;
val = linspace(0.15,0.25,nnz(idx)) ;
Phie(idx) = val ;
  6 commentaires
Nisar Ahmed
Nisar Ahmed le 8 Déc 2021
alright, thank you for help
Image Analyst
Image Analyst le 9 Déc 2021
Attach sample input and desired output if you want more help.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by