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.

 Respuesta aceptada

KSSV
KSSV el 8 de Dic. de 2021
Editada: KSSV el 8 de Dic. de 2021
idx = isnan(Phie) ;
val = linspace(0.15,0.25,nnz(idx)) ;
Phie(idx) = val ;

6 comentarios

Nisar Ahmed
Nisar Ahmed el 8 de Dic. de 2021
Dear @KSSV I tried but it is not working
KSSV
KSSV el 8 de Dic. de 2021
Okay..edited the code.
Nisar Ahmed
Nisar Ahmed el 8 de Dic. de 2021
@KSSV it is working but with this code I got straight line in between say 0.15 0.25. like
Is it possible to get a fluctuated (a bit zigzag) curve like the below one in the above figure?
KSSV
KSSV el 8 de Dic. de 2021
Read about fillmissing.
Nisar Ahmed
Nisar Ahmed el 8 de Dic. de 2021
alright, thank you for help
Image Analyst
Image Analyst el 9 de Dic. de 2021
Attach sample input and desired output if you want more help.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Preguntada:

el 8 de Dic. de 2021

Comentada:

el 9 de Dic. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by