You are here: Foswiki>FEM Web>UsingMaXima (24 Feb 2017, UnknownUser)Edit Attach

UsingMaXima

Solving Non-Linear System of Equation

hints can be found in this web site

http://www.csulb.edu/~woollett/

a package is available for solving general problem that is mnewton

Plotting

Gnuplot Preamble

Extensive control is by gnuplot setting obtained by option gnuplo_preamble as in the following

...[gnuplot_preamble,"set grid; set zeroaxis;"],..

Here some very useful hints about legent etc. in this post answer

http://www.math.utexas.edu/pipermail/maxima/2006/000142.html

This is an example for changing legend

implicit_plot([x^2+y^2=9,x^2/9+y^2/4=1],
[x,-9,9],[y,-6,6],
[gnuplot_curve_titles,["title '1'","title '2'"]],
[gnuplot_preamble, 
 "set grid; set zeroaxis ; set xlabel \"Lift Length [m]\";set ylabel \'Rot. [rad.]\'"])$

Other examples Here

http://www.telefonica.net/web2/biomates/maxima/gpdraw/func2d/index.html

And finally how to change the number of tics on coordinate axis
[L,15,60],[y,-3e6,9e6],
[legend, "phi=0.2","phi=0.25", "phi=0.3", "phi=0.35" ],
[gnuplot_preamble,"set grid; set xtics 15,10,60;set ytics -3e6,2e6,8e6;set zeroaxis"],
[xlabel," Length (m)"],[ylabel,"M(0)"]);

Tics can be defined individually as a label too or in the classical way start,increment,end

Suppress Some Printed Warning

After some easy googling

ratprint: false..

Export Tabled Data

To get the data comma separated for easying import in spreadsheet application use the following strip of codefor example

to table the data
LT:makelist((175+25*j)*0.3048,j,1,20)/0.3048$
Sig:makelist(at(
             at(AM[1]+BM[1],Sol1[1]),
                [E=E0,J=J0,delta=Dpipe*0.0254,L[2]=100*0.3048,L=(175+25*j)*0.3048]),
             j,1,20)$
fpprintprec:4$
Table1:transpose( makelist([ LT[i],Sig[i]
],i,1,20) )$

fpprintprec control the number of digit to print on the output the it is possible to write in a file the content of Table1
write_data(Table1,"~/acer2/Documents/Relazioni/SPSFano/ENBRIDGE/HorizAdjust1.out",comma)

The last argument control the separator character

-- RobertoBernetti - 24 Mar 2011
Topic revision: r1 - 24 Feb 2017, UnknownUser
This site is powered by FoswikiCreative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License1999-2025
Ideas, requests, problems regarding this site? Send feedback