eDgar | 27 Nov 20:41 2014

Maxima within LaTeX

Hi,

I found this: 
http://trisquel.info/en/wiki/recipe-latex-gnuplot-tight-box-eps-maxima . 
However, it doesn't work with the new version of Maxima. Maxima 5.32.1 
(using Lisp GNU Common Lisp GCL 2.6.10) runs well on my 64 bit linux, 
but I get the following error:

Maxima encountered a Lisp error:

  Error in AND [or a callee]: The variable CCOL is unbound.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.

I'm almost sure that it has to do with modifications to mactex.lisp , 
but I have no idea about Lisp.

I don't really need to use the files in the link, but I would like to 
have something like:

This is my text which describes the following formula \ref{eq:Lin}
\begin{subequations}\label{eq:Lin}
	\begin{maximacmd}
		a(z):= m[a]*z + b[a]$
	\end{maximacmd}
	\begin{align}
		% \imaxima{} is substituted by a(z) = m_{a}\,z + b_{a}
		a:= a(z) = \imaxima{tex(a(z))}
	\end{align}
(Continue reading)

Chuck Allison | 27 Nov 06:15 2014
Picon

Maxima Can't Find gnuplot

Hello,

I just installed maxima on Max OS X Yosemite. When I try to use a plot command, I get the following error:

(%i3) f(x,y):= sin(x) + cos(y);
plot3d(f(x,y), [x,-5,5], [y,-5,5]);(%o3)                     f(x, y) := sin(x) + cos(y)
(%i4) 

Maxima encountered a Lisp error:

 Couldn't execute "gnuplot": No such file or directory

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.


Any ideas on how to help Maxima find gnuplot? I tried adding its directory to $PATH but that didn’t help.

Thanks.

Chuck
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Nijso Beishuizen | 26 Nov 21:15 2014
Picon

draw2d hangs with set pm3 interpolate 0,0

Dear all,

In maxima, I want to show an unstructured quadrilateral 2D mesh where
each cell is colored by the Z-value, and the interior is colored by
interpolation of the Z-values at the nodes.

In gnuplot I would do:
set pm3d interpolate 0,0
set pm3d map
splot 'datafile'

When I try to do this in maxima, draw2d opens a gnuplot window, but
seems to be stuck in some loop and never displays the image:

------------------------------------------------------
load(draw);
q:[mesh([[0.0, 0.0, 0.0], [0.5, 0.0, 1.0]], 
[[0.0, 0.5, 0.0], [0.5, 0.5, 0.1249999999384172]]), 
mesh([[0.5, 0.0, 1.0], [1.0, 0.0, 1.224500708041116E-16]], 
[[0.5, 0.5, 0.1249999999384172], [1.0, 0.5, 0.0]]), 
mesh([[0.0, 0.5, 0.0], [0.5, 0.5, 0.1249999999384172]], 
[[0.0, 1.0, 0.0], [0.5, 1.0, 0.0]]), mesh([[0.5, 0.5,
0.1249999999384172], 
[1.0, 0.5, 0.0]], [[0.5, 1.0, 0.0], [1.0, 1.0, 0.0]])];

header:['enhanced3d=true,user_preamble="set pm3d map;set pm3d
interpolate 0,0"];

apply(draw3d,append(header,q));
------------------------------------------------------

If I remove the 'set pm3d interpolate 0,0' statement, the mesh is shown,
but the colors are not interpolated. Displaying a single element is also
working:
draw3d('enhanced3d=true,'user_preamble="set pm3d map;set pm3d
interpolate 0,0",q[1]);

Any ideas on how to make this work?

Best,
Nijso

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Michael Okuntsov | 26 Nov 15:37 2014
Picon

Error in histogram and continuous_freq

Hello,
there is an error in functions histogram ans continuous_freq that appears not always, but frequently. For example,

load(distrib)$
load(descriptive)$
A:random_normal(10,1,500)$
wxhistogram(A,nclasses=15);
B:continuous_freq(A,15);

If you run the script above several times, you can get errors:

[For histogram]

part: invalid index of list or matrix.
#0: continuous_freq(lis=[10.03467505911486,10.30659758285152,9.262040757252517,9.051716420606139,9.222477640231215,9.1087333...,opt=[15])(descriptive.mac line 213)
#1: histogram_description(m=[10.03467505911486,10.30659758285152,9.262040757252517,9.051716420606139,9.222477640231215,9.1087333...,select=[nclasses = 15])(descriptive.mac line 637)
#2: wxhistogram(desc=[[10.03467505911486,10.30659758285152,9.262040757252517,9.051716420606139,9.222477640231215,9.108733...)
 -- an error. To debug this try: debugmode(true);


[For continuous_freq]

part: invalid index of list or matrix.
#0: continuous_freq(lis=[10.03467505911486,10.30659758285152,9.262040757252517,9.051716420606139,9.222477640231215,9.1087333...,opt=[15])(descriptive.mac line 213)
 -- an error. To debug this try: debugmode(true);

wxMaxima 12.04.0, Maxima version: 5.27.0.
I need to use these functions in a big script that cat run over 20 minutes, so please get me your advices.


-- Sincerely, Michael Okuntsov
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
sys | 26 Nov 14:33 2014

ask a question about function ggf in package ggf

Dear Friends:
    I'm using the ggf function maxima to do some caculation about some integer sequence. I want cacu the generate function for them.
But I can only compute one sequence,the sequence is 
             3,6,8,11,13,16,18,21,23,26,28,31,33,36,38,41,43
the result is 
I want to caculate another sequences, such as
8,24,48,80,120,169,225,290,363,444,533,631,736,850,972,1102,1240,1387,1541

but the wolframalpha can caulate out the result
So my question is how can I get the result by maxima?
                Yours sincerely!
                          Shu ShengYu




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Gunter Königsmann | 26 Nov 11:06 2014
Picon

file I/O broken?

Dear all,

I know this is a bug in a third party product. But I have debugged it as
far as I could and now I need a lisp wizard - and this lisp is the only
place I know I will find one.

My problem is: when using a wxMaxima in combination with a current
maxima when I try to read data from a file (or write this data to a
file) the data tends to end up in the wrong directory or to be read from
the wrong directory. Looking at the code I think I got a clue of the
cause of this problem:

If I open a file in the directory /home/gunter/tmp using wxMaxima
wxMaxima issues a
:lisp-quiet (xchdir(tofiledir "/home/gunter/tmp"))
to change maxima's pwd so all file operations are relative to
/home/gunter/tmp

The command tofiledir is provided by wxmathml.lisp which is in turn
provided by wxmaxima and looks unsuspicious to me:

(defun tofiledir (file)
  (let ((path (pathname file)))
    (namestring (make-pathname :device (pathname-device path) :directory
(pathname-directory path)))))

When I issue the following line:
%i1 :lisp (xchdir (tofiledir "/home/gunter/tex/test.wxmx"))
maxima prints out a 0. If I issue
%i2 :lisp (truename ".")
directly afterwards I get /home/gunter/, not the expected value
/home/gunter/tex/. So I suspect the pwd of maxima hasn't changed even if
xchdir was issued.

Does any of you see what has gone wrong?

Thanks a lot,
and

Kind regards,

       Gunter.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Pankaj Sejwal | 25 Nov 15:27 2014
Picon

create list of quoted functions

If I need to create a list of quoted functions from a list of functions, what could be done ? For example,
[a,b,c,d]->['a,'b,'c,'d]

If I do
t:block([temp:[]],for item in [a,b] do temp:cons(parse_string(concat("'",item)),temp),reverse(temp));
(%o8) ['a,'b]

map(symbolp,t);
(%o11) [false,false]

map(atom,t);
(%o24) [false,false]

But are these as manually writing 'a,

map(atom,['a,'b]);
(%o1) [true,true]

Also, let

a(x):=x^2;

b(x):=x^3;
flatten(map(lambda([x],map(x,[2])),t));
(%o6) [a(2),b(2)]

ev(%);
(%o7) [4,8]

Also if one does,
map('a,[2]); => [4]

So, there seems difference how maxima considers t different from manually writing ['a,'b].

what could be one more way to create such a list that doesn't digress from normal behavior (I need not use ev)?

But interestingly, this was something that took me by surprise because using this way one can hold a function unevaluated specially with the argument passed to it.
Of course one could do, 'a(2) but that would be manual work as map('a,[2]) will give 4.


--
Regards,
Pankaj Sejwal
____________________________________________________
"The more I read, the more I acquire, the more certain I am that I know nothing.” -
Voltaire
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
pdiazs@ono.com | 25 Nov 10:12 2014

Re: error in finance package manual


I have found some problem in finance package manual

according with 
maxima manual (5.34) pag 824 one should expect :

(%i2) npv(0.25,
[100,500,323,124,300]);
(%o2) 714.4703999999999

(%i2) npv(0.25,
[100,500,323,124,300]);
(%o2) 893.08

The problem is that the cash flow 
that has been considered in the function assumes a set of payments for 
t=0, 1..... and for  the example in the manual the assumption is that 
the flows start at t=1

if one expects the example to be accurate then 
the pv call in the function pv(rate,flowValues[k],k-1) should be 
changed to pv(rate,flowValues[k],k)

npv(rate,flowValues):=
block([sum,
k],
sum:0,
for k:1 thru length(flowValues) step 1 do
(sum:sum+pv(rate,
flowValues[k],k-1)),
sum
)$

But doing so would represent a problem in 
irr formula that calls npv, and would create an inconsistency with 
graph formula that uses the criteron of t=0 for the vectors.

The 
benefit cost ratio would not be affected anyway.

May I suggest to 
clone graph_flow(flowValues) to wxgraph_flow(flowValues) just changing 
the graph format?

Cheers

Pedro Diaz Simal

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
Barton Willis | 25 Nov 02:33 2014

rtest_simplify_sum tests 54 and 62.

I'm working on reinstating the option variables formerly known as sumhack and prodhack.

Along the way, I've made quite a few changes to asum.lisp, fixing some bugs. Today I ran the share testsuite--I get errors for "rtest_simplify_sum, tests (54 57 62). Test 57 is a known failure, but 54 and 62 aren't.  Here is 62:


$ ./maxima-local
Maxima branch_5_34_base_173_ge8d8282_dirty http://maxima.sourceforge.net
using Lisp Clozure Common Lisp Version 1.9-r15764  (WindowsX8632)

(%i1) display2d : false$

(%i2) load (simplify_sum)$

(%i3) simplify_sum(sum(k*(k/2)!,k,1,n));

(%o3) (n^2+n+2*%r1)*((n+1)/2)!/2-sqrt(%pi)*%r1/2


Is this bug due to my experimental code, or has it existed for sometime and we haven't noticed?


Test 54 is sum(harmonic_number(n)/2^n,n,1,inf) --> 2 * log(2).  I get an asksign on a gensym :(

Answering one way gives the expected value. The asksign on a gensym might be my fault.


All insights are appreciated.



--Barton
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Fred Senese | 23 Nov 22:44 2014

ezunits: binding of `, and cancellation of units?

(%i2) 234`ml * 0.100`mol/l;
(%o2) 23.4 ` (1.0*ml*mol)/l

I have two problems with this result... I'd like the 1.0 not to appear as 
part of the units. I can get rid of it with

(%i3) (234`ml) * (0.100`mol/l);
(%o3) 23.4 ` (ml*mol)/l

The ` operator binds the way it does so that you can have compound units, 
but is there any way to recognize a 1.0 in the resulting
unit and eliminate it automatically?

I'd also like to automatically force unit cancellation. Is there a less 
ugly way to do this than this:

(%i4) % `` 1;
(%o4) 0.0234 mol

Thanks so much, Robert Dodier, for your ezunits package. 
I teach physical chemistry with Maxima, and units and dimensional analysis 
are rather important. 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
pdiazs@ono.com | 22 Nov 17:32 2014

Reenv: problems with eigenvalues (complete)


----Mensaje original----
De: pdiazs <at> ono.com
Fecha: 22/11/2014 17:24

Para: <maxima-discuss <at> lists.sourceforge.net>
Asunto: problems with 
eigenvalues

Hi

I am using  wxMaxima 14.09.0
maxima 5.34.1

I have 
detected a 
problem with eigenvectors and eigenvalues

I have a matrix 
A equal to 
matrix([1,-2.2],[2.874797872880344*10^-4,1])

eigenvalues
(A) produces

[[-2.562407788295719*10^-13*(98144677473*%i-
3902579458928),
2.562407788295719*10^-13*(98144677473*%
i+3902579458928)],[1,1]] 

then 
eigenvectors(A) produces
"algsys 
failure: the eigenvector(s) for the"1"
th eigenvalue will be missing."

"algsys failure: the eigenvector(s) 
for the"2"th eigenvalue will be 
missing."
(%o142) [[[-2.562407788295719
*10^-13*(98144677473*%i-
3902579458928),2.562407788295719*10^-13*
(98144677473*%
i+3902579458928)],[1,1]],[[],[]]]

if i understand 
correctly the 
function autovalues is producing a list with two components, the first 
one with the auto values and the second one with a couple of 1s 

then 
the eigenvalues does something similar.

I have tried with previous 
versions and still happens

can anybody help, 
sorry a first draft 
escaped to the list before completing

Thanks a lot

Pedro DíazSimal  

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

Gmane