# NMinimize not working on custom function?

Posted 17 days ago
166 Views
|
|
0 Total Likes
|
 When defining the values of suma[x] as regression function I 'm able to obtain te true values of suma[x], when entering x manually. Nevertheless when I try to Nminimize suma[x] it seems that this finction does not take the value of x I willl thank a lot any suggestionThanks Attachments:
 I Remove the Quiet[]. When something is not working we want to see all warnings.That shows there is a 1/0 problem that should be tracked down and fixed.Next there are warnings about inexact, but I think those can be ignored.Next it prints "Hola Null"That goes away if I change Print["Hola ",x;]; to Print["Hola ",x]; But then it only prints "Hola x"You print "pHcalc { Log[H$257549]/Log[10],..." and that is possibly an an issue related to local variables inside of a Module.If I remove the use of Module then the H$257549 are replaced with H.Next there are lots of errors about "not a number" when x is negative. Those need to be tracked down and fixed.Can you reproduce all those warnings and errors?Can you see the reason for any of those and perhaps see a way to fix one or more of those?