## maxima-discuss — Maxima discussion list

You can subscribe to this list here.

 2014 2015 2016 2017 Jan Feb (232) Mar (323) Apr (383) May (359) Jun (435) Jul (252) Aug (172) Sep (265) Oct (263) Nov (350) Dec (359) Jan (267) Feb (220) Mar (311) Apr (269) May (388) Jun (403) Jul (172) Aug (399) Sep (364) Oct (269) Nov (357) Dec (468) Jan (618) Feb (592) Mar (625) Apr (516) May (375) Jun (155) Jul (346) Aug (262) Sep (346) Oct (291) Nov (333) Dec (335) Jan (436) Feb (460) Mar (370) Apr (165) May Jun Jul Aug Sep Oct Nov Dec
S M T W T F S

1
(3)
2
(6)
3
(32)
4
(23)
5
(16)
6
(16)
7
(17)
8
(11)
9
(9)
10
(14)
11
(8)
12
(4)
13
(3)
14
(10)
15
(4)
16
(6)
17
(7)
18
(10)
19
(7)
20
(14)
21
(12)
22
(26)
23
(31)
24
(28)
25
(23)
26
(12)
27
(12)
28
(11)
29
(4)
30
(4)

Showing 7 results of 7

 Re: [Maxima-discuss] How to make buildq evaluate its first argument - please help From: Barton Willis - 2014-04-19 19:04:18 ```Maybe your function works perfectly. But consider: (%i1) 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)))))\$ (%i2) george : gen_rhs([sin(a+b),cos(a*b)],[a,b])\$ [sin(y[2,1]+y[1,1]),cos(y[1,1]*y[2,1])] [[sin(y[2,1]+y[1,1])],[cos(y[1,1]*y[2,1])]] (%i3) george(5,z); (%o3) matrix([sin(z[2,1]+z[1,1])],[cos(z[1,1]*z[2,1])]) (%i4) y[2,7] : 42\$ (%i5) george(5,z); (%o5) matrix([sin(y[2,1]+y[1,1])],[cos(y[1,1]*y[2,1])]) Are you certain this is what you want? ________________________________________ On 04/19/2014 03:13:39 PM, Helmut Jarausch wrote: > 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)))) > )\$ ```
 Re: [Maxima-discuss] How forward options? From: Kris Katterjohn - 2014-04-19 17:03:13 ```Hi Helmut, On 04/19/2014 09:56 AM, Helmut Jarausch wrote: > 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? > I think something like fct(x,[options]) := apply('g, cons(x, options))\$ will do what you want. This prevents the list "options" in fct from becoming the list "[options]" in g. > Many thanks for a hint, > Helmut Cheers, Kris Katterjohn ```
 Re: [Maxima-discuss] How forward options? From: Thomas D. Dean - 2014-04-19 16:18:42 ```On 04/19/14 07:56, Helmut Jarausch wrote: I looked at ??assoc and messed around with different arguments, found one that worked. Your definitions ended with an extra [] around the arguments to assoc. I tried fct(x,[options]):= block( g(x,flatten(options)) )\$ fct(1,['dense_output, false]); Tom Dean ```
 [Maxima-discuss] How forward options? From: Helmut Jarausch - 2014-04-19 14:56:16 ```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 ```
 Re: [Maxima-discuss] How to make buildq evaluate its first argument - please help From: Helmut Jarausch - 2014-04-19 13:34:13 ```On 04/19/2014 03:13:39 PM, Helmut Jarausch wrote: > 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? > I've missed square brackets around MList in buildq(... Sorry for the noise, Helmut ```
 [Maxima-discuss] How to make buildq evaluate its first argument - please help From: Helmut Jarausch - 2014-04-19 13:13:44 ```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 ```
 Re: [Maxima-discuss] Qepmax package: interface to Qepcad From: 本田康晃 - 2014-04-19 00:49:23 Attachments: Message as HTML ```Dear Robert san, Barton san, maxima users, I just modified the code as suggested by Robert san, in Github at https://github.com/YasuakiHonda/qepmax As I could not repro the bug Barton san has encountered, I cannot guarantee this fixes the issue, but worth a try. Thanks and best regards, Yasuaki Honda, Chiba, Japan 2014-04-16 0:41 GMT+09:00 Robert Dodier : > On 2014-04-15, Barton Willis wrote: > > > (defun \$prepare_for_qepcad () > > (setf (get '%and 'strsym) '(#\ #\/ #\\ #\ )) ;; <--- GCL and CCL both > think something is wrong here > > (setf (get '%or 'strsym) '(#\ #\\ #\/ #\ )) > > Maybe the first and last characters want to be #\Space. Just guessing. > Maybe it's simpler and clearer to write > > (setf (...) (coerce " /\ " 'list)) > (setf (...) (coerce " \/ " 'list)) > > ?? > > 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 > _______________________________________________ > Maxima-discuss mailing list > Maxima-discuss@... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > ```

Showing 7 results of 7