Maxima Plugin

Maxima Plugin - Messages

#101 Posted: 4/11/2014 10:28:37 AM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Hi mkraska,

First of all, thank you for a great plugin. Smath and Maxima seem to be a good replacement for Mathcad and Mathematica.

Now question for you: is it possible to copy paste within maxima() function? Does not seem to work on my PC (windows 7 64 bit)

Many thanks!
#102 Posted: 4/11/2014 3:26:19 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Thanks for the feedback.

I don't know if I understand you right. There is no special treatment of the Maxima() function in the math region editor. Everything which works for any function arguments should work for the argument of Maxima(). Is your problem really specific to Maxima() or does it show up for - let's say - sin()?
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#103 Posted: 4/16/2014 4:00:26 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Sorry, this is deficiency of Smath Studio overall - seems like you cannot paste any text into a formula.
#104 Posted: 4/18/2014 6:37:52 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Hi mkraska,

I am getting to use maxima plugin a little bit more and ran in a problem very similar to
http://en.smath.info/forum/yaf_postsm12822_Evaluate-expression-for-a-variable-s--set-to-a-number.aspx#post12822

When I pass to Maxima an expression (using Maxima()) with undefined variables to solve it symbolically it does not seem to work. I have created Maxima workbook to confirm that what I am trying to do is achievable using maxima.

Any ideas?

Screenshot and Smath workbook are attached.

Thanks!

wxMaxima code:

***

V:b0*t*alpha*fy;
M:b0*t*alpha*fy*y;
Vall:b(y)*t*alpha*fy;
Mp(b(y))^2*t*fy)/4;
solveMV:solve(V/Vall+M/Mp-1,b(y));
MV:subst([b0=15,alpha=0.577,t=16,fy=385,y=y],solveMV[2]);
solveM:solve(M/Mp-1,b(y));
M:subst([b0=15,alpha=0.577,t=16,fy=385,y=y],solveM[2]);

***
ShearLinkGeometry.sm (91 KiB) downloaded 75 time(s).
#105 Posted: 4/18/2014 7:00:08 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

solve() is the SMath built-in numeric solver.

You want Solve().

EDIT: BTW, you can use text incdices and greek letters with Maxima.
solve.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#106 Posted: 4/18/2014 9:39:35 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

mkraska,

That explains why solve() function did not work, however it does not explain why Maxima(solve())= function did not work - it should have passed solve() to maxima in which solve() is correct syntax.

Thank you for your help!!!
#107 Posted: 4/19/2014 1:16:12 AM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

Also I am not sure where to post it but I found a very decent guide to maxima - it is a good source for most "how to" a typical user might need

http://www-com.physik.hu-berlin.de/~bunk/kurs/maxima/maxima.html

1 users liked this post
Martin Kraska 4/19/2014 4:03:00 AM
#108 Posted: 4/19/2014 3:46:47 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

That explains why solve() function did not work, however it does not explain why Maxima(solve())= function did not work - it should have passed solve() to maxima in which solve() is correct syntax.


Maxima() just like any other function in the Maxima plugin translates the arguments only after SMath preprocessing, i.e. substituting all known symbolic expressions and executing all known functions. If a function is not smart enough to return itself if this evaluation fails, then the preprocessing throws an error. In the given case, solve() should return itself if evaluated symbolically.

Switching off preprocessing (you can do that in the maxima debugging window) is not an option, unless you want the arguments of solve() being transferred to Maxima verbatim.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#109 Posted: 4/21/2014 3:51:45 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Here you find a preliminary version of portable SMath with Maxima.

Installation: just unpack the zip to the root (or whereever you want) of an USB Stick. Download is approx. 60 MB, unkompressed 150 MB.

Usage:

When you put the USB stick to a new host, start SMath\Maxima\X-Maxima.exe and close the wxMaxima Window. This sets the path (drive letter) correctly. Repeat this step, if you move to a different computer, where the stick has a different drive letter.

The Maxima plugin is already configured and ready for use.

There is a known problem: Sometimes you have to add MaximaControl("restart" ) in order for Draw2D/3D to work. Please report any problems.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
Radovan Omorjan 4/21/2014 5:42:00 PM, ioan92 4/21/2014 4:49:00 PM
#110 Posted: 4/21/2014 5:39:03 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Martin,

Thank you for this portable version.

Unfortunately, it is not working for me as expected. Maxima can not be restarted if we use same saved file. The Starting Maxima window for the second time is not responding and MaximaControl(restart) gives "Maxima was closed"

When I copy all the regions into an empty worksheet, then Maxima could be restarted more than once, but the plots are not presented and the error was "The path is not of a legal form".

There might be a problem in the "maxima.bat" again. Look at it please. For instance, there is "set path" from your computer but the other paths are from mine.

I even tried to delete maxima.bat and to restart X-Maxima. The result is "maxima2.bat" but id did not help at all.

Find both *.bat files in the maxima.zip please.

Regards,
Radovan
maxima.zip (2 KiB) downloaded 66 time(s).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#111 Posted: 4/21/2014 6:55:46 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Radovan, thanks for testing.

In the original maxima.bat, the lines 25 to 27 look like this:

set path=%maxima_prefix%\gnuplot;%maxima_prefix%\bin;%maxima_prefix%\lib\gcc-lib\mingw32\3.3.1;%path%

if "%USERPROFILE%" == "" goto win9x

obviously, X-Maxima.exe replaces the references to environment variables %path% and %USERPROFILE% by their values in maxima.bat. In subsequent runs of X-Maxima these are not corrected. For line 27 this can be handled by just commenting it out, for line 25 I do not have
a solution.

What I try now is to just use the ordinary Maxima-Installer and hardwire all file references in maxima.bat with flexible drive letter references. This requires the zip file to be installed in the root of the usb drive, which should not be a prohibitive requirement. Then, no X-Maxima should be required any more...
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#112 Posted: 4/22/2014 3:53:40 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Here is a new preliminary portable SMath+Maxima version.

Improvements:
- Changed to Maxima 5.33.0 (works with draw)
- restart of Maxima should be possible
- X-Maxima not involved any more
Remaining problems:
- Absolute path to maxima must be used in Maxima settings (has to be changed if USB drive letter changes)

Install:
Unpack the zip file in the root dir of your USB drive

Usage:
- start SMath at SMath\2014...
- make sure the path to maxima is set correctly: Insert> Maxima> Settings: Specify absolute path to maxima (Drive:\SMath\Maxima-5.33.0.1 should do)

We try to go with relative path name in order to avoid the mentioned adjustments. Please report any issues.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#113 Posted: 4/22/2014 6:18:27 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Unfortunately, this is not working for me as well

I changed the path with Insert>Maxima>Settings.

-
-
C:\Users\omorr\Downloads\Software\SMath\SMath\Maxima-5.33.0.1\bin\maxima.bat

Path is correct, I checked twice.

But now, restarting Insert>Maxima>Settings or MaximaControl(restart) will simply freeze the Start Maxima window and not starting Maxima. Will try some more to some other computers.

Regards,
Radovan

[EDIT] I put it now on the USB stick

-
-
F:\SMath\Maxima-5.33.0.1\bin\maxima.bat

Strange, but now it works . But I am not sure if this would work on another computer (No Smath, No Maxima) and if this would be portable. I could see that Temp folder on the stick was used for temporary plot files. Here is my maxima.bat file. I hope that it should be this way.

[EEDIT]

I tried right now the stick to another computer (No SMath, No Maxima) and it works
maxima.zip (1 KiB) downloaded 60 time(s).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Martin Kraska 4/22/2014 7:18:00 AM
#114 Posted: 4/22/2014 7:17:34 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Due to the internal logic of maxima.bat it is essential that the portable version is installed in the root directory of the drive. Thus having it somewhere on the harddisk won't work unless it resides directly in C:\

This is consistent with what you reported. Nice to hear that it works if properly installed. When trying on other computers, you may need to change the drive letter in the maxima settings.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#115 Posted: 4/22/2014 7:27:26 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Wrote

Due to the internal logic of maxima.bat it is essential that the portable version is installed in the root directory of the drive. Thus having it somewhere on the harddisk won't work unless it resides directly in C:\

This is consistent with what you reported. Nice to hear that it works if properly installed. When trying on other computers, you may need to change the drive letter in the maxima settings.



Than you Martin. I must have been forgotten this, sorry.

By the way, as uni updated Image region plugin Image Region - png problem it seems that png plots will update now. Moreover, it removed SMath crashes on my office computer when using your Draw2D3D and other Maxima files
Thank you uni
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#116 Posted: 5/3/2014 12:00:28 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Here is another portable SMath with Maxima.

- unzip the file wherever you want (space requirement 140 MB
- launch the executable in SMath\2014 04 17 SMath 0.97.5189 Portable

You also can run wxMaxima in SMath\Maxima-5.33.0.1\wxMaxima

As a test you might run the attached file. The package contains an experimental version of the Maxima plugin, some of the features (in particular the file format of plot regions) may change.

There are stability issues with the draw functions. They can crash Maxima and sometimes SMath if their input is not defined.

Fit.sm (21 KiB) downloaded 80 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Radovan Omorjan 5/3/2014 4:04:00 PM
#117 Posted: 5/6/2014 12:26:55 PM
patel75

patel75

0 likes in 3 posts.

Group: User

Hi,

I've just restarted SMath after a break of a couple of years and am finding the Maxima plugin is the best thing in SMath since I last used it.

I do however have a minor problem. When doing a taylor expansion, the expression displayed by SMath is being factorised. This is quite annoying for me and I would like to know if there is a way to display the expansion is the standard format as displayed by Maxima. See below.

SMATH output
SmathMaximaTaylor.PNG


Maxima Output
MaximaTaylor.PNG
MaximaTaylor.PNG
#118 Posted: 5/6/2014 12:49:08 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

SMath Optimization should be suppressed when using Maxima plugin. Right click on the Maxima region and choose Optiization|None

[MATH=eng]Maxima(taylor(g(x),x,0,10))=1-{x^2}/2+{x^4}/24-{x^6}/720+{x^8}/40320-{x^10}/3628800[/MATH]

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
patel75 5/7/2014 3:51:00 AM
#119 Posted: 5/10/2014 7:42:25 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I've uploaded a snippet with descriptions for Maxima Draw2D and Draw3D graphic options and objects. Thus they are known to the dynamic assistant for hints on syntax and for auto-completion.

Shortcut is "Draw"

todo:
- integration of the texts in the Maxima plugin (possibly with config file for adding new texts without re-compilation)
- translation to other language (now mostly german)
- extension to other Maxima functions.
draw-snippet.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#120 Posted: 5/28/2014 3:54:41 AM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello Martin,

I can not figured out what is going on here by looking at the log file. Please look at the picture and the attached file. If I use numbers inside distrib package functions I have the result, but if I use variables - problems arise. Am I missing something here?

Regards,
Radovan
maimaport.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • New Posts New Posts
  • No New Posts No New Posts