AlgLib 3.1x - AlgLib Plugin (based on ALGLIB 3.1x) - Messages
It seems that the convolution function from the alglib plugin does not care for the second and fourth arguments (problem size in alglib ). I guess that the problem size is nothing else than the size of the 1st and 3rd arguments, thus they are obsolete.
If that is correct than I suggest to provide a convr1d(2) function.
BTW, a real symmetric eigensolver would be fine...
It seems that the alglib license does not allow for inclusion of the plugin in any smath distribution, except if someone buys a commercial license.
[Moderator]: Moved.
conv.sm (6 KiB) downloaded 167 time(s).





Functions list: al_airy(), al_beta(), al_convr1d(), al_convr1dinv(), al_fftc1d(), al_fftc1dinv(), al_nleqsolve(), al_rkckadapt(), al_polyroots().
[albumimg]81[/albumimg] [albumimg]83[/albumimg] [albumimg]121[/albumimg] [albumimg]1546[/albumimg] [albumimg]1585[/albumimg]
[albumimg]1560[/albumimg] [albumimg]1547[/albumimg] [albumimg]1561[/albumimg] [albumimg]1562[/albumimg] [albumimg]1563[/albumimg]
Examples:
alglib.ode.integrate.sm (11 KiB) downloaded 92 time(s).
alglib.ode.kinetic1.sm (7 KiB) downloaded 133 time(s).
alglib.ode.kinetic2.sm (10 KiB) downloaded 119 time(s).
alglib.ode.kinetic3.sm (10 KiB) downloaded 116 time(s).
alglib.ode.test1.sm (10 KiB) downloaded 130 time(s).
alglib.ode.test2.sm (10 KiB) downloaded 115 time(s).
alglib.ode.Amplitude detector.sm (19 KiB) downloaded 121 time(s).
alglib.ode.integrate.pdf (92 KiB) downloaded 99 time(s).
alglib.ode.kinetic1.pdf (75 KiB) downloaded 120 time(s).
alglib.ode.kinetic2.pdf (89 KiB) downloaded 95 time(s).
alglib.ode.kinetic3.pdf (83 KiB) downloaded 109 time(s).
alglib.ode.test1.pdf (85 KiB) downloaded 106 time(s).
alglib.ode.test2.pdf (89 KiB) downloaded 103 time(s).
alglib.ode.Amplitude detector.pdf (147 KiB) downloaded 111 time(s).
Fourier series coefficients.sm (28 KiB) downloaded 163 time(s).
Fourier series coefficients.pdf (170 KiB) downloaded 127 time(s).
Links:
1. ALGLIB
WroteIt seems that the convolution function from the alglib plugin does not care for the second and fourth arguments (problem size in alglib ). I guess that the problem size is nothing else than the size of the 1st and 3rd arguments, thus they are obsolete.
If that is correct than I suggest to provide a convr1d(2) function.
I think it's best to follow the description in the source code (see doc.pdf). I corrected the behavior of the function and added an inverse function convr1dinv().
Wrote
I think it's best to follow the description in the source code (see doc.pdf). I corrected the behavior of the function and added an inverse function convr1dinv().
Uni, thanks for the update. Now the function convr1d seems to insist on providing the correct vector sizes as arguments. This is not really an improvement unless values differing from the actual length can be provided for some magic purpose. I did not find any such hint in the doc. Thus, in order to keep the argument list lean, I would recommend to have
[MATH]convr1d(f;g)[/MATH] and let the interface determine the sizes as in the previous version.
However, I do not want to distract you from progress in the xyplot-plugin!
Martin
WroteWrote
I think it's best to follow the description in the source code (see doc.pdf). I corrected the behavior of the function and added an inverse function convr1dinv().
Thus, in order to keep the argument list lean, I would recommend to have
[MATH]convr1d(f;g)[/MATH] and let the interface determine the sizes as in the previous version.
Ok, I'll add this too. It seems to me that I need to follow the documentation to describe the interfaces of functions.
WroteWrote
Thus, in order to keep the argument list lean, I would recommend to have
[MATH]convr1d(f;g)[/MATH] and let the interface determine the sizes as in the previous version.
Ok, I'll add this too. It seems to me that I need to follow the documentation to describe the interfaces of functions.
Thanks for considering the change. This would perhaps apply to the other integral transforms as well. When providing sort of convr1d(2), then you could add a hint to the doc string that the size parameters in alglib are determined from the actual size).
The alglib version of the Beta function seems o return values if one argument is negative despite of the docs limiting the range to posive arguments. Also, in contrast to the implementation in the StatisticalTools Plugin, the function cannot handle complex numbers.
I added the plugin to the inofficial SMath distribution.
After a look at the alglib license I feel safe to do so. The available functions are (at least a little) documented in the Handbook based on alglib docs and examples by uni.
[albumimg]116[/albumimg]
WroteUpdated. al_convr1d(2), al_convr1dinv(2) added.
Thanks for implementing the proposal.
On my system, Example 2.sm fails to run correctly. If I replace the al_convr1dinv(4) by al_convr1dinv(2) then it is ok. My handbook examples show the same effect, on top of that, in conv.sm, there is an xy-plot-region throwiing an critical error. It does not recover, even if I fix the convolution problem with the new (2)-call. conv1.sm is the fixed version.
conv1.sm (11 KiB) downloaded 107 time(s).
This algorithm solves system of nonlinear equations F(x).
Parameters:
X0 - starting point.
StepMax - maximum step length, >=0. Set StpMax to 0.0, if you don't want to limit step length.
Eps - >=0. The subroutine finishes its work if on k+1-th iteration the condition ||F||<=EpsF is satisfied.
[albumimg]121[/albumimg] [albumimg]123[/albumimg]

I could see that al_nleqsolve() will not work with
[MATH=eng]f(v):eval(F(el(v,1),el(v,2),el(v,3)))[/MATH]
[MATH=eng]j(v):eval(Jac(el(v,1),el(v,2),el(v,3)))[/MATH]
Is there any way to make this possible?
Regards,
Radovan
WroteI think it is not necessary, since the function within itself already performs this. I need more examples. Try this solver at work.
I just have some frustrating experience when the Jacobian is involved, and would rather appreciated some "derivative free" algorithms of this kind.
Here is just a playing with the NonlinearSolver plugin which includes Levenberg-Marquard algorithm and this one in AlgLib. For this particular example all performed quite well.
[albumimg]122[/albumimg]
Regards,
Radovan
WroteWroteI think it is not necessary, since the function within itself already performs this. I need more examples. Try this solver at work.
I just have some frustrating experience when the Jacobian is involved, and would rather appreciated some "derivative free" algorithms of this kind.
Here is just a playing with the NonlinearSolver plugin which includes Levenberg-Marquard algorithm and this one in AlgLib. For this particular example all performed quite well.
[albumimg]122[/albumimg]
Regards,
Radovan
Thank you, Radovan. Unfortunately, this interface is defined by the function.
[albumimg]123[/albumimg]
You can compare with the examples from here: Using the AlgLib ODE (Runge-Kutta) Solver with Excel.
[albumimg]228[/albumimg] [albumimg]230[/albumimg] [albumimg]231[/albumimg] [albumimg]229[/albumimg]
al_nleqsolve.sm (15 KiB) downloaded 110 time(s).
al_nleqsolve.pdf (41 KiB) downloaded 103 time(s).
WroteUpdated to AlgLib 3.14, refactored
Thanks UNI, works fine 6179.
Jean
Unfortunately I can't provide complete example, but if I pass to solver copy-pasted copies of the equations, it works.
See it below. The problem is that plugin can't read correct result of symbolic calculations, but solver written in Smath does it right.
example.sm (48 KiB) downloaded 102 time(s).
-
New Posts
-
No New Posts