|
yakir <yakirsudry@gmail.com> wrote in message <4bc2addb-8190-420f-b4e1-d4c084d8caab@l33g2000pri.googlegroups.com>...
> I am trying to make a simple fit and I just don't get things right.
>
> I am trying to fit for the function y=a*sin(b*x+c)
> I have the variable
> y=[1,1.1............]
> and
> x=[0,0.2,..............]
>
> those hold the information to fit by
>
> if can someone write the script that will give me a, b and c properly
> it will be very helpful
> thanks
I would suggest using the curve fitting Toolbox. Just type 'cftool' in the command line, import your x and y data, and select the type of fit you're looking for - in this case, Sum of Sin Functions. Once satisfied with the fit, you can generate an M-file from the File menu and modify it if you wish.
hope it helps,
Mastaneh
|