You need a fortran compiler ! names = flibname = ilib_for_link ( names, " myfun.f ",, " f " ) // 7-3/ link it to scilab (see link help page) link ( flibname, names, " f " ) // 7-4/ ready for the leastsq call: be carreful do not forget to // give the dimension m after the routine name ! = leastsq ( list ( " myfun ", m, tm, ym, wm ), x0 ) // without Jacobian = leastsq ( list ( " myfun ", m, tm, ym, wm ), " mydfun ", x0 ) // with Jacobian 7-1/ Let ' s Scilab write the fortran code (in the TMPDIR directory): f_code = cd TMPDIR mputl ( f_code, TMPDIR + ' /myfun.f ' ) // 7-2/ compiles it. 8-1/ Let ' s Scilab write the C code (in the TMPDIR directory): c_code = mputl ( c_code, TMPDIR + ' /myfunc.c ' ) // 8-2/ compiles it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |