Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Parameter estimation in Matlab?
Replies: 3   Last Post: Oct 17, 2013 3:45 AM

 Messages: [ Previous | Next ]
 Torsten Posts: 1,717 Registered: 11/8/10
Re: Parameter estimation in Matlab?
Posted: Oct 17, 2013 3:45 AM

Am Donnerstag, 17. Oktober 2013 01:10:50 UTC+2 schrieb Christiano:
> Em sábado, 12 de outubro de 2013 21h36min38s UTC-3, dpb escreveu:
>

> > On 10/12/2013 11:52 AM, Christiano wrote:
>
> >
>
> > > Hi,
>
> >
>
> > >
>
> >
>
> > > I have the following formula representing a physical system:
>
> >
>
> > > a = K1*arctg[K2*(w1-K3*w2)/(w1+K3*w2)]
>
> >
>
> > > Known constants ===> w2
>
> >
>
> > > Unknown constants ===> K1, K2, K3
>
> >
>
> > >
>
> >
>
> > > That is, "w1" input generate "a" output.
>
> >
>
> > > Through experimentation I have a table ("w1","a").
>
> >
>
> > >
>
> >
>
> > > Is there any command in matlab to find the parameters K1, K2, K3
>
> >
>
> > > using this table ("w1","a") ??
>
> >
>
> >
>
> >
>
> > Whassup w/ this thing of everybody calling data arrays and vectors
>
> >
>
> > "tables"????
>
> >
>
> >
>
> >
>
> > What's arctg? arctan() maybe???
>
> >
>
> >
>
> >
>
> > doc lsqnonlin
>
> >
>
> >
>
> >
>
> > --
>
>
>
> dpb, thanks for your notes, I started with matlab less than 1 week.
>
> I'll be honest, I do not understand nothing of matlab. I'm trying to use lsqnonlin but is a bit difficult.
>
> What is the basis that I need to understand the docs matlab?
>
> Can recommend books?
>
> I need it to do my graduation project because it will be necessary to do laboratory experiments of a physical system.

x0 = [1; 1; 1] % Starting guess
[x,resnorm] = lsqcurvefit(@myfun,x0,w1,a);

function F = myfun(x,w1)
K1=x(1);
K2=x(2);
K3=x(3);
w2=...;
F = K1*atan(K2*(w1-K3*w2)./(w1+K3*w2));

Best wishes
Torsten.

Date Subject Author
10/12/13 Christiano
10/12/13 dpb
10/16/13 Christiano
10/17/13 Torsten