How can I interpolate this row?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Hi Everyone, I would like to get your help to interpolate this vector: x=[2 NaN NaN 5 NaN NaN] to fill the messing values
Thanks in advance
Riyadh
2 comentarios
Rik
el 7 de Nov. de 2017
Do you have an estimation of the function that should be used? Because if it is anything other than linear, you have too few values.
Riyadh Muttaleb
el 7 de Nov. de 2017
Editada: Riyadh Muttaleb
el 7 de Nov. de 2017
Respuestas (1)
Check if the fillmissing function does what you want. https://mathworks.com/help/matlab/ref/fillmissing.html
3 comentarios
Riyadh Muttaleb
el 7 de Nov. de 2017
You don't have the associated license.
try something like :
nanx = isnan(x);
t = 1:numel(x);
x(nanx) = interp1(t(~nanx), x(~nanx), t(nanx));
Riyadh Muttaleb
el 7 de Nov. de 2017
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!