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

Hi, Is there a way in Matlab to perform a leastsquares fit on a column vector, with the constraint that the slope is zero? 
Subject: leastsquares fit with constraint From: Richard Startz Date: 2 Dec, 2010 01:44:54 Message: 2 of 9 
On Thu, 2 Dec 2010 01:28:05 +0000 (UTC), "gkk gkk" 
Richard Startz <richardstartz@comcast.net> wrote in message <6fudf6d8e8njopfrs3gv76vq97ant76kms@4ax.com>... 
"gkk gkk" <gkkmath@comcast.net> wrote in message <id6uh9$3hn$1@fred.mathworks.com>... 
Subject: leastsquares fit with constraint From: John D'Errico Date: 2 Dec, 2010 11:19:05 Message: 5 of 9 
"gkk gkk" <gkkmath@comcast.net> wrote in message <id6uh9$3hn$1@fred.mathworks.com>... 
Subject: leastsquares fit with constraint From: Richard Startz Date: 2 Dec, 2010 15:06:16 Message: 6 of 9 
On Thu, 2 Dec 2010 11:19:05 +0000 (UTC), "John D'Errico" 
> >> Thanks Richard, I'm not sure I understand. Are you saying if I enter: 
Subject: leastsquares fit with constraint From: John D'Errico Date: 2 Dec, 2010 16:43:07 Message: 8 of 9 
"gkk gkk" <gkkmath@comcast.net> wrote in message <id8gtp$inv$1@fred.mathworks.com>... 
"John D'Errico" <woodchips@rochester.rr.com> wrote in message <id8iar$mcf$1@fred.mathworks.com>... 
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.