I need the "`[fopt,xopt,gopt]=leastsq(list(cost,time,value),p)" command for obtaining the necessary model parameters. What can we do? Heinz
> On 29.08.2024, at 08:42, Stéphane Mottelet <stephane.motte...@utc.fr> wrote: > > Hello Heinz, > > See https://gitlab.com/scilab/scilab/-/issues/17285 > > S. > >> On Aug 29, 2024, at 03:55, Heinz Nabielek <heinznabie...@me.com> wrote: >> >> My last line of code (below) forces Scilab to quit unexpectedly. Why? And >> how can I avoid it? >> Heinz >> >> PS Code and data are massively simplified from my "real" problems..... >> >> // Functional behaviour obtained from integration >> function YP=Model2(p,xc) >> x=1:300; df2=(exp(-x/p))/p;f2=cumsum(df2); >> YP=f2(xc) >> endfunction >> // Measurements >> time=[10 50 70 80 100 170 200]; >> value= [ 0.09 0.49 0.6 0.68 0.71 0.89 0.91]; >> // Cost function >> function DV=cost(pv, xv, yv) >> DV= Model2(pv,xv)-yv; >> endfunction >> // Nonlinear least squares fit >> p=77; [fopt,xopt,gopt]=leastsq(list(cost,time,value),p);pfit=xopt ______________ Dr Heinz Nabielek Park Residenz Döbling Seniorenheim, App. 134 Hartäckerstraße 45, 1190 Wien, Österreich Tel +43 1 476 20 134 cell +43 677 616 349 22 heinznabie...@me.com _______________________________________________ users mailing list - users@lists.scilab.org Click here to unsubscribe: <mailto:users-unsubscr...@lists.scilab.org> https://lists.scilab.org/mailman/listinfo/users This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Dassault Systèmes does not accept or assume any liability or responsibility for any use of or reliance on this email. Please be informed that your personal data are processed according to our data privacy policy as described on our website. Should you have any questions related to personal data protection, please contact 3DS Data Protection Officer https://www.3ds.com/privacy-policy/contact/