How i can fix this issue in MATLAB?

1 次查看(过去 30 天)
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.

采纳的回答

KSSV
KSSV 2021-12-8
编辑:KSSV 2021-12-8
idx = isnan(Phie) ;
val = linspace(0.15,0.25,nnz(idx)) ;
Phie(idx) = val ;
  6 个评论
Image Analyst
Image Analyst 2021-12-9
Attach sample input and desired output if you want more help.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by