Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!news.ecp.fr!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: simple linear fit
Date: Tue, 15 Mar 2011 23:44:37 -0700
Organization: Aioe.org NNTP Server
Lines: 23
Message-ID: <ilpm8s$shj$1@speranza.aioe.org>
References: <ilpl9k$8n2$1@ginger.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: tUYQ4Ty9mMw9Pdc8TJRFQA.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:716126

On 3/15/2011 11:28 PM, Steve Sachay wrote:
> I have two sets of numbers, and I want to find the scale factor that will bring one as
>  close as possible to the other, ie the simple y=Ax model.

You mean like

---------------
%date
>> y = 9;
>> x = 4;

% ALGORITHM  ENGINE
>> A = y/x;  

%result
>> A*scale_factor
--------------

ans =
      9

--Nasser