MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

piecewise linear function fitting !!



Hi,

I tried without sucess to map some Data with a piecewise linear
function: x0 and x1 are not taken in account as parameters and do not
change !

Any solution ??

Regards,
 


Data1= Map[ (#+ Random[Real, {-5,5}])&  ,
     { 1.5,1.4,1.3,1.2,1.1,1, 0.9, 0.8, 0.7, 0.6, -1, -10,-8, -7,
-5,-3,-1,1,3,5,7,9,10, 11} ]  ; 

func := Which[ x < x0, a x + b, (x>x0) || (x<x1), c x + d, x > x1, e x +
f ];
				
ListParam = {a,b,c,d,e,f,x0,x1};
		
Bet = {    whatever...      };     
		
l= Transpose[{ListParam, Bet}];	
				
TryFit = NonlinearRegress[ Data1, func, x, l , ShowProgress -> True ];





  • Prev by Date: Re: Simple question
  • Next by Date: MathLink slowdown on Win-NT - reposted
  • Prev by thread: Re: Re: Change viewpoints in real time
  • Next by thread: MathLink slowdown on Win-NT - reposted