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

Notification

Icon
Error

Login


4 Pages123>»
Options
Go to last post Go to first unread
Offline mkraska  
#1 Posted : 25 September 2013 00:14:54(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)
Example for beam calculation using separate integration intervals.
File Attachment(s):
example beam integration piecewise.sm (35kb) downloaded 341 time(s).
mkraska attached the following image(s):
example beam integration piecewise.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 3 users thanked mkraska for this useful post.
on 25/09/2013(UTC),  on 25/09/2013(UTC),  on 27/09/2013(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 25 September 2013 01:47:25(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)
Thanks Martin Good

By the way, I was playing with the special functions from Maxima. It seems to work pretty well, except I do not know how to deal with small numbers - look at the picture please.

Regards,
Radovan

File Attachment(s):
Maxima_spec_functions.sm (11kb) downloaded 163 time(s).
omorr attached the following image(s):
Maxima_spec_functions.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 25/09/2013(UTC)
Offline Davide Carpi  
#3 Posted : 25 September 2013 09:25:47(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)
E must be replaced by *10^ before sending the answer to the canvas (inside the plugin, obviously)

Edited by user 25 September 2013 09:37:34(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
thanks 1 user thanked Davide Carpi for this useful post.
on 25/09/2013(UTC)
Offline mkraska  
#4 Posted : 25 September 2013 14:29:29(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)
Issue was already fixed, obviously became victim of the arg/dec sep change. Is on the todo list again.

In general, if any function in a Maxima-command is known to SMath, it will be evaluated before the call of Maxima. Thus, if you want to see Maxima's erf(), you must switch off the Statistical Tools plugin.

Maxima functions normally can handle vector or matrix arguments (applied by element). Thus plotting should be possible without loops.
There seems to be an expression size restriction for the Maxima call. If the increment in vx in the bessel plotting example is reduced, than the evaluation process seems to hang and needs to be stopped.

Edited by user 25 September 2013 19:18:44(UTC)  | Reason: Not specified

mkraska attached the following image(s):
erf.PNG
mplot.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline omorr  
#5 Posted : 26 September 2013 08:27:52(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
Issue was already fixed, obviously became victim of the arg/dec sep change. Is on the todo list again.

Thank you
Originally Posted by: mkraska Go to Quoted Post
In general, if any function in a Maxima-command is known to SMath, it will be evaluated before the call of Maxima. Thus, if you want to see Maxima's erf(), you must switch off the Statistical Tools plugin.

Ah yes, you ar right. You already mentioned this in one of your examples
Originally Posted by: mkraska Go to Quoted Post
Maxima functions normally can handle vector or matrix arguments (applied by element). Thus plotting should be possible without loops.
There seems to be an expression size restriction for the Maxima call. If the increment in vx in the bessel plotting example is reduced, than the evaluation process seems to hang and needs to be stopped.

I like this vector, matrix handling thing. It looks to me that in this way we can get numerical values by avoiding loops. As for the matrix, vector sizes in Maxima(float()) expressions, I looked at the "string" expression passed to Maxima system and suppose this has to do with the maximal size of the string Maxima can handle.

Regards,
Radovan

Edited by user 26 September 2013 09:55:43(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 29/09/2013(UTC)
Offline mkraska  
#6 Posted : 29 September 2013 18:03:45(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 do not know how to deal with small numbers - look at the picture please.


Fixed, plugin updated. For other changes see Update description sheet
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline mkraska  
#7 Posted : 29 September 2013 18:05: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)
Originally Posted by: omorr Go to Quoted Post
I do not know how to deal with small numbers - look at the picture please.


Fixed, plugin updated.
mkraska attached the following image(s):
float.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 29/09/2013(UTC)
Offline mkraska  
#8 Posted : 11 October 2013 01:32:00(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)
Laplace transformation with Maxima. Examples from the Maxima Handbook.
One needs to experiment a bit in order to completely avoid "evil red text" (verbatim Maxima code) in Maxima() arguments.
File Attachment(s):
Example Maxima Laplace.sm (20kb) downloaded 108 time(s).
mkraska attached the following image(s):
laplace.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 11/10/2013(UTC)
Offline mkraska  
#9 Posted : 17 October 2013 00:30: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 a preview, how plotting can work with the Maxima plugin.

This is actually done using the current public state of the plugin, but cannot be recommended yet for serious work. Setting the plot options is painful (because of the many translation errors it causes) and functionality is very limited therefore. Actually, it is gnuplot doing the job in the background.

Limitations:
- you cannot specify output names with extensions or path specifications (currently no way to convey . or \ in strings to Maxima)
- therefore no way to use svg output, as image region refuses to display svg files without extension (complains about insufficient memory).
- we have problems with list translation, thus parameter handling for plot functions is unstable. Perhaps we need to really parse the expression structure in order to get this right (currently, translation is based on a set of regular expressions).

Edit: the plot files are written to the install directory of SMath.

Edited by user 17 October 2013 01:00:13(UTC)  | Reason: Not specified

File Attachment(s):
plotting.sm (23kb) downloaded 171 time(s).
mkraska attached the following image(s):
plot3d.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 17/10/2013(UTC),  on 17/10/2013(UTC)
Offline mkraska  
#10 Posted : 18 October 2013 22:47:08(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)
Some more examples for plots with Maxima and Gnuplot.

Limitations:
- still no way to send strings to maxima, thus no path names, no file name extensions and no options with space characters such as "png size 300 200"
- any command or option must not have strings in it, however, most options may be written as plain variable names.
- different plots need different filenames, it can work with one name for all plots of a sheet but that is not reliable.
- Calls to set_plot_options() fail to display the result in SMath but do their job on the Maxima side.
- EDIT: Again, all this works only, if your current directory is the SMath install directory.

The good news is that so far all plots from the maxima handbook which I've tried did actually work. Also, the format for options spec is quite readable.

Edited by user 18 October 2013 23:26:58(UTC)  | Reason: Not specified

File Attachment(s):
dynamics.sm (14kb) downloaded 136 time(s).
plotting.sm (19kb) downloaded 128 time(s).
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 18/10/2013(UTC)
Offline mkraska  
#11 Posted : 28 October 2013 01:05:39(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)
Examples for using the ODE.2() function
File Attachment(s):
ODE.2.sm (29kb) downloaded 113 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
thanks 3 users thanked mkraska for this useful post.
on 28/10/2013(UTC),  on 29/10/2013(UTC),  on 29/10/2013(UTC)
Offline omorr  
#12 Posted : 31 October 2013 20:31:23(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)
Hello,

I was playing with ODE.2 (nice job Martin Good ) and bumped into this difference about numeric and symbolic optimization, again.
I could not see the source of this difference - only in one point, I think (look at the green line please). Have I missed something?

Regards,
Radovan

Edited by user 31 October 2013 20:36:43(UTC)  | Reason: Not specified

File Attachment(s):
ODE.2-plugflow-2.sm (21kb) downloaded 86 time(s).
omorr attached the following image(s):
maximaoptnum.png
maximaoptsym.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 31/10/2013(UTC)
Offline mkraska  
#13 Posted : 31 October 2013 23:26:57(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)
Radovan, thanks for highlighting the problem. The source is in the different handling of expressions of type a^b^c in Maxima and SMath. The fix is much like with the a^-b problem. We include it in the next update of the plugin.

For the time being you may replace the file smath.mac in the SMath install dir by the attached one (zipped because of .mac attachments blocked).

EDIT: you can save computation/translation time by doing the numeric evaluation on Maxima side

Edited by user 31 October 2013 23:49:28(UTC)  | Reason: Not specified

File Attachment(s):
smath.zip (1kb) downloaded 75 time(s).
mkraska attached the following image(s):
abcd.PNG
float.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 01/11/2013(UTC)
Offline mkraska  
#14 Posted : 10 November 2013 16:15:04(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
... bumped into this difference about numeric and symbolic optimization, again.
I could not see the source of this difference - only in one point, I think (look at the green line please). Have I missed something?
Regards,
Radovan


Fixed, Plugin updated.
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 10/11/2013(UTC)
Offline mkraska  
#15 Posted : 10 November 2013 16:33:37(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)
Examples, how SVG images of variable size can be generated using Maxima plugin.
Note that this required implementation of string constant transfer between SMath and Maxima.

Background has been set to nearly white to avoid transparency in the image region.
File Attachment(s):
svg.sm (24kb) downloaded 121 time(s).
mkraska attached the following image(s):
p1.PNG
p2.PNG
p3.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 10/11/2013(UTC)
Offline omorr  
#16 Posted : 25 November 2013 03:33:59(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)
Hello,

Here is an example of using distrib package in Maxima. One can also use Statistical Tools plugin, but there are some important quantile functions missing there.
I also used Function's Extension plugin.

By the way, I also tried descriptive and stats packages, but they can not be loaded (draw package is problematic here). I do not know what is the problem here. Just accepted that some of the packages, like the mentioned ones, can not be used at this stage of Maxima plugin development. Did not want to bother to much Good

Regards,
Radovan

Edited by user 25 November 2013 03:37:51(UTC)  | Reason: Not specified

File Attachment(s):
distrib-Maxima.sm (19kb) downloaded 87 time(s).
omorr attached the following image(s):
distrib-Maxima.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 25/11/2013(UTC)
Offline omorr  
#17 Posted : 25 November 2013 19:17:02(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 what happened on my x64-Win7 laptop and Martin's unofficial build. Find two test files (distrib-Maxima-1.sm and ODE.2-Plugflow-2.sm).
If I open the first one (distrib-Maxima-1.sm) and do the recalculation few times, sometimes it just fail (see the second picture). When I open additionally ODE.2-Plugflow-2.sm and recalculate distrib-Maxima-1.sm, again some unexpected errors appear (see the third picture).

If someone is wiling, try to reproduce please.

Regards,
Radovan

Edited by user 25 November 2013 19:20:45(UTC)  | Reason: Not specified

File Attachment(s):
distrib-Maxima-1.sm (20kb) downloaded 76 time(s).
ODE.2-plugflow-2.sm (21kb) downloaded 75 time(s).
omorr attached the following image(s):
distrib-Maxima-1.png
distrib-Maxima-2.png
distrib-Maxima-3.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 25/11/2013(UTC)
Offline mkraska  
#18 Posted : 25 November 2013 20:03:53(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)
Hi Radovan, thanks for your examples on statistics with Maxima.

I can reproduce the reported problem.
Your distrib sheet relies on Maxima not taking over the internal functions, because the sum() function works differently in Maxima and thus corrupts most programs using the sum function (just like StdDev()).

As all sheets of a given SMath instance share the same Maxima session and plugin settings, the takeover/surrender status is global for all open sheets. In ODE.2... you explicitly ask for takeover, thus after doing that, distrib...sm won't work any more.

Thus, add MaximaControl("surrender" ) to your distrib sheet, then the problem is solved.

I see the following problems to be solved:
- the takeover/surrender status should be local to a given sheet (this might require considerable effort)
- the takeover/surrender status should be reset to default upon cleanup and restart (this is just a bug, to be fixed)
- the sum takeover/surrender should be controlled separately, because the maxima version is good for symbolic handling but incompatible to the native version otherwise.
- perhaps we might switch to takeover of int(), det(), lim() and surrender for sum and diff by default.
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 25/11/2013(UTC)
Offline omorr  
#19 Posted : 25 November 2013 20:49:06(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. I just did not pay enough attention on takeover/surrender issue.

By the way, did you have a chance to open the distrib sheet on a 64bit computer. This time just to open only this sheet - without the second one. I am just surprised because the subsequent recalculation on my home 32 bit Win7 worked well and did not produce an error. Contrary, on my office 64bit the subsequent recalculation sometimes produces an error in loading distrib package (picture two on the previous post). I just do not know when and why is this happening. If you can not reproduce this, I will make a video presentation of this behavior when I get to my office.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline mkraska  
#20 Posted : 26 November 2013 01:16:33(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 always use my x64 Win7 notebook. I had very severe problems when trying your files at work. Now at home (same computer), I cannot reproduce them, except the StdDev issue with Maxima sum. I saw rubbish error messages containing §§ characters.



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 Pages123>»
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.