Helmut Jarausch | 19 Apr 16:56 2014
Picon
Picon

How forward options?

Hi,

I can't get it right:

given

g(x,[options]) := block([dout],
   dout: assoc('dense_output,options,true),
   return(7)
)$

fct(x,[options]):= block(
   g(x,options) /* this doesn't work if options is an empty list */
)$

g(1);
fct(1);

gives the error message:

assoc: every list element must be an expression with two arguments;  
found: [[]]

What am I missing?

Many thanks for a hint,
Helmut
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
(Continue reading)

Helmut Jarausch | 19 Apr 15:13 2014
Picon
Picon

How to make buildq evaluate its first argument - please help

Hi,

I'm struggling with Maxima's macro feature.

Given a list of expressions and a list of variables, say
[sin(a+b),cos(a*b)] and [a,b]
I'd like to convert this to a function mapping
y -> matrix([sin(y[1,1]+y[2,1])],[cos(y[1,1]*y[2,1)])

My attempt so far is

gen_rhs(Ex,Vars)::= block([n:length(Ex),m:length(Vars)],
   Exs:subst(makelist(Vars[i]=y[i,1],i,m),Ex),print(Exs),
   MList:ev(makelist(makelist(Exs[i]),i,m)),print(MList),
   buildq(MList,lambda([t,y],matrix(splice(MList))))
)$

Unfortunately, Maxima complains that MList is not a list.
What am I missing?

Many thanks for a hint,
Helmut

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
(Continue reading)

Dan Gildea | 18 Apr 14:07 2014
Picon
Picon

Re: lispdisp

This change is causing an error in the test suite:

Running tests in rtest16: 
********************** Problem 35 ***************
Input:
string(mplus(a, b, mnctimes(c, d), mexpt(e, f)))

Result:
'mplus(a,b,'mnctimes(c,d),'mexpt(e,f))

This differed from the expected result:
'?mplus(a,b,'?mnctimes(c,d),'?mexpt(e,f))

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
Dimiter Prodanov | 18 Apr 13:51 2014
Picon

Re: stucts in Maxima

Dear all,

Are there benefits in using strcuts in Maxima? Or is this just a step towards future OO features?
I have tried using structs in some of my code but so far it is really artificial and I can do without them.

best regards,

Dimiter
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Pankaj Sejwal | 18 Apr 13:43 2014
Picon

levels in nested list

Hi,
I was trying to see if I can collect information from list based on the depth of nesting of sub-lists.
But I realized that it should be accomplish-able only by tree. I learned programming binary tree in lisp to some extent but it won't be helpful and I will have to try tree with any number of child nodes. 
I also found out that there is 'sequence' function in lisp which can make the work easier as I can do
-------------------------------------------------------
li:[g,f,t,h,[a,b,c],[[t,y,u]]]
/*after filtering out non-list elements li=[[a,b,c],[[t,y,u]]]*/
IN::map(lambda([x],apply(sequence,[x]),li) 
OUT:: [a,b,c,[t,y,u]]
/*Again filtering out and repeating the process will leave me with [t,y,u].*/
--------------------------------------------------------
 In this way I can collect sub-lists at different labels. I couldn't see this sequence function in Maxima. Is there any certain reason it wasn't included ? 

Regards,
Pankaj Sejwal


--
Regards,
Pankaj Sejwal
_______________________________________________
"The more I read, the more I acquire, the more certain I am that I know nothing.” -
 Voltaire
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Robert Dodier | 17 Apr 20:26 2014
Picon

generating info files in share subdirs via make

In the "there's gotta be a better way" dept., I wonder if there is a
less clumsy way to generate .info and *-index.lisp files in 
subdirectories of share. The larger goal here is to load package-
specific .info documentation so that it's findable via ? and ??.

What I have so far is the following, and it works (i.e., creates
info and index files). For each subdirectory foo which has a foo.texi
in it:

 * add share/foo/Makefile to AC_OUTPUT in configure.in
 * add foo to SUBDIRS in share/Makefile.am
 * create Makefile.am in share/foo like this:

info: foo.info foo-index.lisp

foo.info: foo.texi
	makeinfo foo.texi

foo-index.lisp: foo.info
	perl ../../doc/info/build_index.pl $< > $ <at> 

 
I'm interested to know if there is a way to handle this which does not
require modifying configure.in, modifying share/Makefile.am, and
creating a per-subdirectory Makefile.am. Avoiding any of those steps
would be an improvement. Thanks for any advice.

best

Robert Dodier

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
Helmut Jarausch | 16 Apr 14:01 2014
Picon
Picon

What's the name for the standard input stream

Hi,

I'd like to use functions like readchar to read from the standard input  
("stdin")
within a Maxima script which is run by maxima -b.
Since readchar has a "stream" parameter, what's the name of this stream.
And what are the names of "stdout" and "stderr" ?

Sorry, but I couldn't find anything in Maxima's documentation nor on  
Google.

Many thanks for a hint,
Helmut

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
Ether Jones | 16 Apr 03:33 2014
Picon

find x which minimizes L1 norm of Bx-s


I have an M-by-N matrix B and an M-by-1 column vector s.

M>N.

I want to find the N-by-1 column vector x which minimizes sum(abs(B*x-s))

What is the recommended way to do this in Maxima?

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Henry Baker | 14 Apr 16:07 2014
Picon

dumb xmaxima question

I understand that xmaxima talks to the maxima GCL process via TCPIP sockets.

What package does the GCL process use to talk to these sockets?

Where is the documentation for this?

When I Google "Common Lisp" and sockets, I get a bunch of stuff that
seems to require CLOS, and I'd like to program at a lower level, if
possible.

Thanks for any info/links.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
本田康晃 | 14 Apr 15:19 2014
Picon

Qepmax package: interface to Qepcad

Dear maxima users,

Qepmax package, an extension to Maxima to interface with Qepcad B, is available from Github at:

"Download ZIP" button is available for download qepmax-master.zip.

You need to separately install Qepcad B program.

Qepcad B is a software that performs 'quantifier elimination' or Q.E.. This is quite powerful to solve a large set of issues. Here is an example:
Assuming C: x^2+y^2=1, L:y=x+b, let's find a condition on r, a, b, so that C and L cross with each other. Qepmax package can be used to solve such a math problem.

(%i1) load(qepmax)$

(%i2) qe([[E,x],[E,y]], x^2+y^2=1 %and y=x+b);

(%o2) b^2-2=<0;

Note that in qe() argument, x and y are quantified varialbles, while 'b' is a free variable. The output inequation b^2-2=<0 does not contain any quantified variables. Quantified variables are eliminated!!

There are a large collection of literatures on Q.E. and you can find them by using Google search.

Qepmax package is written by me and enhanced by Prof. Reinhard Oldenburg san.

The Github page includes INSTALL for how to install and README for how to use it.

Keep in mind, this is still a beta release quality. If you have any questions and comments, please let me know, or post it here. 

Yasuaki Honda, Chiba, Japan
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Helmut Jarausch | 14 Apr 13:39 2014
Picon
Picon

How to debug Maxima code?

I haven't found a comfortable method to debug Maxima code.
I am looking for a method to step through my code, seeing the current  
line and values of variable if possible.

Unfortunately, dbl.el doesn't work for me, since I use the Sbcl lisp  
compiler only.
(dbl.el depends on gcl, unfortunately. The Gentoo Linux distribution  
has even masked gcl
because of its bugs.

Many thanks for some hints,
Helmut
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech

Gmane