Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


4 Pages<1234>
Options
Go to last post Go to first unread
Offline omorr  
#41 Posted : 04 January 2014 16:52:21(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Nothing spectacular, just followed Martin's example from the least squared fit and produced this simple plot after using the problematic function from stats package. It was a bit trial-and-error, and it might be not so elegant-but it works.

Regards,
Radaovan

Edited by user 04 January 2014 16:55:35(UTC)  | Reason: Not specified

File Attachment(s):
stats-testing-5.sm (16kb) downloaded 85 time(s).
omorr attached the following image(s):
stats-testing-5.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#42 Posted : 04 January 2014 21:58:55(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
I added a plot with the draw package and tried to streamline the regression.

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.
File Attachment(s):
Example Maxima stats draw.sm (15kb) downloaded 86 time(s).
mkraska attached the following image(s):
stats.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 05/01/2014(UTC)
Offline omorr  
#43 Posted : 05 January 2014 01:40:16(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you Martin very much,

It does really work and it is quite nice Good . I think I understand a bit more how the things are working Good
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
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#44 Posted : 20 January 2014 03:24:19(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Here is how the gaps in StatisticalTools by Davide could be filled. The quantile functions, however, are rather slow. I don't know if that is due to slow translation or to the slow algorithm. Also, the chi2-quantile seems to not be robust (sometimes fails to be plotted).

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.
File Attachment(s):
distrib.sm (11kb) downloaded 77 time(s).
mkraska attached the following image(s):
stats.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 20/01/2014(UTC)
Offline omorr  
#45 Posted : 20 January 2014 09:26:53(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: mkraska Go to Quoted Post
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.

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
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline baijo  
#46 Posted : 30 March 2014 03:33:40(UTC)
baijo

Rank: Newbie

Groups: Registered
Joined: 21/03/2014(UTC)
Posts: 9
United Kingdom

Would like to use the plot/draw functions from maxima in the executable file generated by the Smath viewer.
Offline mkraska  
#47 Posted : 30 March 2014 12:07:01(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: baijo Go to Quoted Post
Would 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.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline mkraska  
#48 Posted : 18 April 2014 01:20:12(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Here is a small program for generation of Ashby-like material property charts. The data has been taken from the online ressources for Buchmayr 2002. Besides the Maxima plugin and it's drawing functions this program also demonstrates the use of varous plugins by Davide (Table, Slider, DataExchange, Checkbutton List)

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.

Edited by user 18 April 2014 03:21:23(UTC)  | Reason: Not specified

File Attachment(s):
Werkstoffdiagramme.zip (49kb) downloaded 95 time(s).
mkraska attached the following image(s):
mpc.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 18/04/2014(UTC),  on 18/04/2014(UTC)
Offline Davide Carpi  
#49 Posted : 18 April 2014 13:17:36(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Thanks Martin, nice work Good

CheckBoxList is under development (alpha/not public - in this state it's "naturally" buggy) Biggrin


Best regards,

Davide


edit: for the testers, there's a plugin in the EM to open and save again worksheets containing ComboBoxList regions.

Edited by user 18 April 2014 20:29:30(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline mkraska  
#50 Posted : 19 April 2014 01:50:34(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Improved version of the Ashby chart generator.
- bubbles are elliptic
- minimal bubble size independent of axes limits
- separate checkboxes for selection of material groups
File Attachment(s):
Werkstoffdiagramme.sm (47kb) downloaded 78 time(s).
mkraska attached the following image(s):
materials.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline mkraska  
#51 Posted : 28 May 2014 19:27:03(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Here is a modified version of Radovan's distrib-example. Changes were required, because of
- The plugin does not convert Maxima lists to SMath vectors any more,
- distrib functions seem to require float arguments.

Edited by user 28 May 2014 19:32:27(UTC)  | Reason: Not specified

File Attachment(s):
distrib-Maxima_Kr.sm (19kb) downloaded 66 time(s).
mkraska attached the following image(s):
distrib.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 28/05/2014(UTC)
Offline omorr  
#52 Posted : 29 May 2014 12:21:39(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you Martin for correcting the example. Here is another one using F distribution from Maxima distrib package. Statistical plugin by Davide is used as well. There is a nice feature in this plugin of returning two columns when using probability distribution functions (missing quantile functions unfortunately). One 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

Regards,
Radovan

Edited by user 29 May 2014 12:25:26(UTC)  | Reason: Not specified

File Attachment(s):
distrib-Maxima_Kr-2.sm (20kb) downloaded 63 time(s).
omorr attached the following image(s):
distrib-Maxima_Kr-2.png
maximapdf.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 29/05/2014(UTC)
Offline mkraska  
#53 Posted : 30 May 2014 01:09:22(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: omorr Go to Quoted Post
One 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.

File Attachment(s):
distrib-Maxima_Kr_F.sm (102kb) downloaded 85 time(s).
mkraska attached the following image(s):
fdist.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline omorr  
#54 Posted : 30 May 2014 10:37:49(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you Martin for this one Good . You read my mind, as I was browsing your Maxima drawing examples reminding the Draw2D options and trying to do a similar thing. Now, you've made me a template. Thank you.

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
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline omorr  
#55 Posted : 30 May 2014 14:29:33(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Here is another simple example of using SMath and Maxima plugin for a textbook example. One has to admit that teaching with SMath might be a fun Good

Regards,
Radovan

Edited by user 30 May 2014 14:48:47(UTC)  | Reason: Not specified

File Attachment(s):
textbook example.sm (141kb) downloaded 73 time(s).
omorr attached the following image(s):
textbook example.png
texbook example units.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#56 Posted : 05 June 2014 20:29:30(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Here is an example (LRC oscillator) for solving differential equations from the Maxima mailing list. The combination of SMath Studio and Maxima has much better and more convenient support for units than native Maxima.

The first version solves the generic system of differential and linear algebraic equations directly. A second version is to follow in the next post.

Edited by user 05 June 2014 20:31:35(UTC)  | Reason: Not specified

File Attachment(s):
Example Maxima desolve.sm (13kb) downloaded 74 time(s).
mkraska attached the following image(s):
lrc4.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 06/06/2014(UTC)
Offline mkraska  
#57 Posted : 05 June 2014 20:36:27(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
And here is a version of the previous example where we reduce the system to a second order ODE using Maxima's ev() function. Due to spurious imaginary parts in the numeric evaluation of the result, we have to use Maxima again for extraction of the real part.
File Attachment(s):
Example Maxima desolve1.sm (16kb) downloaded 82 time(s).
mkraska attached the following image(s):
lrc1.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 06/06/2014(UTC)
Offline omorr  
#58 Posted : 06 June 2014 08:21:13(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Nice example of desolve(), especially pointing out using of units. Thank you Martin.

Moreover, I just forgot this trick about setting x-range on the native Smath 2D plot.

Regards,
Radovan
omorr attached the following image(s):
Example x-range.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline omorr  
#59 Posted : 06 June 2014 13:57:37(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Just testing desolve() based on the example from Maxima by Example. I am not sure that desolve() can solve other than initial conditions for t=0.

Regards,
Radovan

Edited by user 06 June 2014 14:03:34(UTC)  | Reason: Not specified

File Attachment(s):
odesolve-ode2.sm (25kb) downloaded 73 time(s).
omorr attached the following image(s):
odesolve-ode2.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 06/06/2014(UTC)
Offline mkraska  
#60 Posted : 06 June 2014 16:52:59(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
Originally Posted by: omorr Go to Quoted Post
I 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().

File Attachment(s):
odesolve-ode2_Kr.sm (24kb) downloaded 68 time(s).
mkraska attached the following image(s):
ode2.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Users browsing this topic
Similar Topics
Maxima application source code (Questions)
by ioan92 18/10/2023 00:14:38(UTC)
Error implementing ToolboxGroup for the maxima plugin (Questions)
by fakemoses 31/07/2023 20:09:47(UTC)
Problems with release of MaximaPlugin (Bugs & Problems)
by mkraska 14/07/2023 12:07:53(UTC)
Maxima Plugin Feedback Survey: Share Your Ideas and Report Bugs (Feature Requests)
by fakemoses 16/06/2023 13:27:33(UTC)
Cannot solve a matrix equation with the Maxima plug-in (Questions)
by EngMath 13/06/2023 12:19:51(UTC)
MAXIMA PLUGIN expand (Questions)
by Angel695 21/05/2023 10:43:40(UTC)
Solve Function Stuck (46/47) with Maxima Plugin (Questions)
by Albedo 30/08/2022 05:24:23(UTC)
Maxima Draw2D labels error (Bugs & Problems)
by DiegoV 14/06/2022 07:52:42(UTC)
I can't access Maxima tools (Bugs & Problems)
by yeyu 19/05/2022 06:48:56(UTC)
The Maxima Solver can't solve the symbolic equations (Questions)
by netsonicyxf 19/02/2022 10:35:04(UTC)
Can't solve linear equation involving temperatures with Maxima plug-in (Questions)
by EngMath 30/01/2022 16:40:45(UTC)
SMath on Linux with Maxima (Questions)
by micky 17/01/2022 19:28:57(UTC)
[Maxima Plugin] Text exportation issue (Questions)
by SteelCat 11/01/2022 12:47:31(UTC)
Maxima Plugin problem (Bugs & Problems)
by FT_PENG 23/12/2021 23:49:19(UTC)
Maxima Draw 2D (Questions)
by PE_Electron 23/12/2021 21:28:05(UTC)
4 Pages<1234>
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.