Error in fmincon-NaN values
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alessandra Costa
el 20 de Feb. de 2019
Comentada: Star Strider
el 20 de Feb. de 2019
Hi to everyone, I work with a matrix of time series (21 financial time serie), and I'm trying to use fmincon optimization function. Given the maximum likelihood function that I defined, when I call fmincon function, using interior-point algorithm, fmincon stopped because it founds NaN in the data input vectors. There are some NaN in every vector that's included in the matrix, and I would like to know if it is possible to overcome this problem. If I preliminarly treat the missing values in the matrix, with interpolation method (i.e.linear) or if I substitute NaN with 0, fmincon works, but obviously the results are influenced by missing data treatment. Is there any method to ignore NaN data in input vector?
Thank yo so much.
0 comentarios
Respuesta aceptada
Star Strider
el 20 de Feb. de 2019
The usual method MATLAB toolboxes use to deal with NaN values in data is to omit the entire row that has a NaN value in any column. (This also follows the usual MATLAB convention of rows being observations and columns being individual variable values in each observation.) You need to decide if this approach works in your situation and with your data.
2 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!