MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > simple linear fit 

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. I have tried \ but that seems to perfectly divide the first points in each series. Polyval(x,y,1) does not seem to work either, the fit is slightly better but can be improved. What should I be using? 
On 3/15/2011 11:28 PM, Steve Sachay wrote: 
"Nasser M. Abbasi" <nma@12000.org> wrote in message <ilpm8s$shj$1@speranza.aioe.org>... 
On 16 Mrz., 08:39, "Steve Sachay" <core...@gmail.com> wrote: 
"Steve Sachay" wrote in message <ilppep$ica$1@ginger.mathworks.com>... 
Thank you very much. Both methods posted give me the same answer of course, but slightly different than my explicit method. I have to say "by eye" my fit looks the best but they are both very good. 
"Steve Sachay" wrote in message <ilpl9k$8n2$1@ginger.mathworks.com>... 
"Steve Sachay" wrote in message <ilpqtm$ls8$1@ginger.mathworks.com>... 
"Roger Stafford" wrote in message <ilprgc$n7c$1@ginger.mathworks.com>... 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.