I define a piecewise linear function with If statements,
and then sample the function on a list. And then I try
to do an optimization on it (sum of squares...)
FindMinimum always complains about not being able
to find the gradient. Has anyone come up with a way
to do this?
Let us say I define (0,1)->R^2 to be a triangle
Then I sample it on say {0.1,0.3,0.5,0.7,0.9} and then
I come up with another sampling, say {0.1,0.3,0.4,0.7,0.9}
Now if I do Sum[(triangle1samples[[i]]-triangle2samples[[i]])^2,{i,1,5}]
and then perturb {0.1,0.3,0.t+4,0.7,0.9} and do a minimization
of Sum over the second sample (i.e. t) FindMinimum complains
about not being able to take the gradient. I unserdtand why
it does, the question is, can I circumvent this somehow????
Sinan
--
Redistribution by Microsoft Network is prohibited.