Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2!postnews.google.com!l33g2000pri.googlegroups.com!not-for-mail
From: yakir <yakirsudry@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: fitting script
Date: Tue, 30 Dec 2008 13:07:02 -0800 (PST)
Organization: http://groups.google.com
Lines: 13
Message-ID: <4bc2addb-8190-420f-b4e1-d4c084d8caab@l33g2000pri.googlegroups.com>
NNTP-Posting-Host: 132.64.143.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1230671222 28729 127.0.0.1 (30 Dec 2008 21:07:02 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 30 Dec 2008 21:07:02 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: l33g2000pri.googlegroups.com; posting-host=132.64.143.105; 
	posting-account=B0UjbQoAAABP6eUKbW-U5lrxJYOeexXJ
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) 
	Gecko/2008120122 Firefox/3.0.5,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:509267


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