Maxima - Examples for using the Maxima Plugin - Сообщения
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
Regards,
Radaovan
The result of the statistics functions is a so called inference_result object, being essentially a list structure with a set of access functions.
items_inference(obj) lists the available attributes, take_inference(attr,obj) returns the value of the specified attribute.
An advantage of the draw package is that you can plot 2 column matrices just like in SMath. Thus the example works without a single list<>matrix conversion.
Example Maxima stats draw.sm (14 КиБ) скачан 154 раз(а).
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
It does really work and it is quite nice


The "inference_results" thing is a good one as well. I do not now how much time it would take to figure out myself. Thank you.
Regards,
Radovan
The function definitions in the attached sheet are not entirely consistent to Davide's plugin, as they do not produce a 2 column matrix when they receive vector input.
Davide, if you do not want to use the Maxima algorithms in your plugin (which might be more efficient), then we could provide the functions as part of the Maxima-plugin.
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
WroteDavide, if you do not want to use the Maxima algorithms in your plugin (which might be more efficient), then we could provide the functions as part of the Maxima-plugin.
Thank you Martin for pointing this out once more. As I know, Davide asked for some appropriate algorithms to fill the gap in the StatisticalTools. These quantile functions which missed there are one of the most frequently used. It would be rather useful if they are inside Statistical tools, although we have them via Maxima as Martin presented.
Regards,
Radovan
WroteWould like to use the plot/draw functions from maxima in the executable file generated by the Smath viewer.
You might file your feature request in the bug tracking system. Please attach an .sm sheet for testing.
However, providing Maxima as part of compiled software might violate their license terms.
It would be easy to generate the bubbles in the modeller region. But that has to wait until Andrey finds some time to document how to place text annotations.
Then one might be able to click the bubbles in order to create and place label strings.
EDIT: Due to a checkboxlist bug I had to remove the material chooser. For now you have to switch on and off the materials by setting the corresponding entry in gr.sel to 1 or 0.
Werkstoffdiagramme.zip (48 КиБ) скачан 155 раз(а).

CheckBoxList is under development (alpha/not public - in this state it's "naturally" buggy) :d
Best regards,
Davide
edit: for the testers, there's a plugin in the EM to open and save again worksheets containing ComboBoxList regions.
- The plugin does not convert Maxima lists to SMath vectors any more,
- distrib functions seem to require float arguments.
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
Regards,
Radovan
WroteOne more interesting thing is to note about distrib package functions. They will not use vectors as arguments returning vector results - therefore we have to use loops (see the second picture). This is contrary to other Maxima examples where we can avoid loops in Smath
Much like the SMath plugins, many Maxima features are provided by third party packages (wrt the core development team) and there are as many opinions on what a good function interface is as there are contributors.
It is surely possible to re-define the Maxima functions such that they accept matrix arguments and return two-col matrices in that case. If you have a corresponding idea, then you can add the definition to your maxima.xml and try if it works. We can then include this into the plugin distribution.
I added a Maxima based plot to the sheet.
distrib-Maxima_Kr_F.sm (101 КиБ) скачан 151 раз(а).
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator

About the changing maxima.xml, unfortunately it is beyond my capabilities at the moment. I am far from being an advanced user of these things - just a curious one.
Regards,
Radovan
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
The first version solves the generic system of differential and linear algebraic equations directly. A second version is to follow in the next post.
Example Maxima desolve.sm (12 КиБ) скачан 139 раз(а).
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
325 сообщений из 2052 понравились и 1 не понравились пользователям.
Группа: Moderator
Regards,
Radovan
WroteI am not sure that desolve() can solve other than initial conditions for t=0.
Maxima doc says that initial conditions can only be specified for x=0. One might wonder why then t has to be specified in atvalue(), but that function has more uses than just specification of initial conditions.
BTW, you also can use ODE.2, a wrapper for ode2, with preprocessing of the equation switched off.
Also, you can specify the initial conditions in Solve using Davide's at().
-
Новые сообщения
-
Нет новых сообщений