SMath Studio Forum
»
SMath Studio
»
Samples
»
Using splines to find the Area Under the Curve
Rank: Member Groups: Registered
Joined: 28/03/2023(UTC) Posts: 26 Location: San Miguel de Tucumán Was thanked: 3 time(s) in 3 post(s)
|
Hi, These two examples solve the problem calculations for the total biomass formed in a batch bioreactor and the pattern flow of a reactor with a pulse of some tracer. The splines method and the Simpson integration formula found in the forum let me solve both problems. Kind regards, splines_integral_data.sm (31kb) downloaded 27 time(s). splines_integral_data1.sm (32kb) downloaded 20 time(s).
|
1 user thanked Javier Ochoa for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 14/10/2015(UTC) Posts: 308
Was thanked: 77 time(s) in 58 post(s)
|
Hello Fitting Javier's data to the Gauss function by the Levenberg-Marquardt Algorithm Javier_fit_CBG.sm (38kb) downloaded 19 time(s).Best Regards Carlos
|
1 user thanked CBG for this useful post.
|
|
|
Rank: Member Groups: Registered
Joined: 28/03/2023(UTC) Posts: 26 Location: San Miguel de Tucumán Was thanked: 3 time(s) in 3 post(s)
|
Hi Jean and Carlos, These worksheets help me to better understand the problem which I tried to solve.
Thanks in advance,
|
|
|
|
Rank: Member Groups: Registered
Joined: 28/03/2023(UTC) Posts: 26 Location: San Miguel de Tucumán Was thanked: 3 time(s) in 3 post(s)
|
Hi Jean and Carlos, I am curious about your thoughts for the result I found using the al_nlqsolve routine from ALGLIB. May be I was lucky to find a similar solution. Kind regards, LevenbergMarquardt_solver.sm (28kb) downloaded 15 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 14/10/2015(UTC) Posts: 308
Was thanked: 77 time(s) in 58 post(s)
|
Originally Posted by: Javier Ochoa Hi Jean and Carlos, I am curious about your thoughts for the result I found using the al_nlqsolve routine from ALGLIB. May be I was lucky to find a similar solution. Kind regards, LevenbergMarquardt_solver.sm (28kb) downloaded 15 time(s). Hi Javier As you can see in the graph, the green line is that of your solution, and it is not correct, since it does not fit the data. It is always important to draw the curve Javier fit.sm (25kb) downloaded 9 time(s).Best Regards Carlos
|
1 user thanked CBG for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,471 Was thanked: 921 time(s) in 586 post(s)
|
Hola Javier. Your Levenberg Marquardt algorithm works pretty well, but you choose a bad guess starting point, with a very high tolerance. BTW, I made some few modifications and use also other target function. LevenbergMarquardt_solver.sm (33kb) downloaded 15 time(s). LevenbergMarquardt_solver.pdf (234kb) downloaded 12 time(s).Best regards. Alvaro.
|
2 users thanked Razonar for this useful post.
|
on 24/05/2023(UTC), on 24/05/2023(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,471 Was thanked: 921 time(s) in 586 post(s)
|
Originally Posted by: Javier Ochoa Hi, These two examples solve the problem calculations for the total biomass formed in a batch bioreactor and the pattern flow of a reactor with a pulse of some tracer. The splines method and the Simpson integration formula found in the forum let me solve both problems. Kind regards, splines_integral_data.sm (31kb) downloaded 27 time(s). splines_integral_data1.sm (32kb) downloaded 20 time(s). Hola Javier. You can also use this code for integrate and differentiate tabulated data. splines_integral_data.sm (86kb) downloaded 14 time(s). splines_integral_data.pdf (181kb) downloaded 7 time(s).Best regards. Alvaro. Edited by user 24 May 2023 21:55:06(UTC)
| Reason: Not specified
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 983 time(s) in 811 post(s)
|
|
1 user thanked Jean Giraud for this useful post.
|
|
|
SMath Studio Forum
»
SMath Studio
»
Samples
»
Using splines to find the Area Under the Curve
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.