Calibration with lsqnonlin

6 visualizaciones (últimos 30 días)
Kristine
Kristine el 30 de Abr. de 2011
Comentada: Alexander Schneider el 13 de Feb. de 2019
Hi
I need to calibrate some parameters by minimizing the following equation: AP= sqrt(sum from i=1 to n w_i (P_i model - P_i market)^2) where w_i is a weight for each observation. I use lsqnonlin. I works fine without the square root, since I run a loop for each observation, and I have less parameters than observations.
The problem comes, when I sum up after the loop since lsqnonlin then think that I only have one observation and several parameters. Does anyone knows, how I can overcome this problem?
Thanks!
  1 comentario
Alexander Schneider
Alexander Schneider el 13 de Feb. de 2019
I know, that the question was asked almost 8 years ago, but apparently people are still searching for topics like these.
The problem in the case above was, that the author returned a scalar instead of the full vector. Hence Matlab thought that the calibration problem was underdetermined and returned an error.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Model-Based Calibration Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by