From: srikanth on
Dear Sir,

i have to find the parameters for a real world plant. I have the real world data and i want to use fmincon to minimize the error between ymeasured-ysimulation.

my function is
f(1) = real world data
f(2) = p1(x^2)+p2(x)-m*g
e = f(1)-f(2)

i want to minimise e and find the parameters p1 and p2. Here 'x' is known to me

i have to find the parameters. i also know the lower bounds and upper bounds of the parameters.

I appreciate your help greatly.

Kind Regards
From: John D'Errico on
"srikanth " <sriprem.pullagura(a)gmail.com> wrote in message <hsuh54$t1c$1(a)fred.mathworks.com>...
> Dear Sir,
>
> i have to find the parameters for a real world plant. I have the real world data and i want to use fmincon to minimize the error between ymeasured-ysimulation.
>
> my function is
> f(1) = real world data
> f(2) = p1(x^2)+p2(x)-m*g
> e = f(1)-f(2)
>
> i want to minimise e and find the parameters p1 and p2. Here 'x' is known to me
>
> i have to find the parameters. i also know the lower bounds and upper bounds of the parameters.
>

Why use fmincon to do something that a simple linear
regression will do?

If m and g are known constants, and x is a column vector,
and f1 is also a column vector, then do this...

p12 = [x.^2, x]\(f1 +m*g);

John