maxima-discuss — Maxima discussion list

You can subscribe to this list here.

 2014 2015 2016 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 (286) Mar Apr May Jun Jul Aug Sep Oct Nov Dec
S M T W T F S

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

Showing 10 results of 10

 Re: [Maxima-discuss] question about function identification From: Robert Dodier - 2014-03-13 21:13:06 ```On 2014-03-13, Dimiter Prodanov wrote: > The only difficulty I see with your approach is that the ft() gets the > expression as an argument so nounification of the argument ft('expr, ...) > does not work. Well, I guess you want to sometimes want rect(t, T) to evaluate to something else (if abs(t) < T then ...) and sometimes you just want to leave it be. The arrangement you have now with rect and _rect functions accomplishes that, although I think it can be done more simply by via rect and 'rect. But if you don't like that, you can also omit the function definition rect(t, T) := ... and make rect a simplifying function (i.e. defined via tellsimp/tellsimpafter rules) or you could make up a rule just for expanding rect (i.e. defrule(expand_rect, rect(t, T), if abs(t) < T then ...)). > I have created a code repo on GitHub for this project: > > https://github.com/dprodanov/maximaft/ Without changing anything else, I think you can replace ft with a function which just calls apply1(expr, rule1, rule2, rule3, ...) and get the same behavior, right? apply1 inspects expr to see if it matches a rule, so all the explicit expression hacking can be omitted. Beyond that, I think you can replace the foo / _foo constructs with simplifying functions or rules. Also it would be very helpful to include a list of input expressions and the output you expect to get from each one. batch("foo.mac", test) computes the result for one expression and compares it to the next. Finally I'd like to recommend omitting bits of code which don't change the result. You can omit the block if there's just one expression; you can omit return; the variable %% is automatically assigned the value of the previous expression in a block instead of using a named variable. Hope this helps, Robert Dodier ```
 Re: [Maxima-discuss] question about function identification From: Dimiter Prodanov - 2014-03-13 16:56:17 Attachments: Message as HTML ```Dear Robert, Thanks for the suggestions. The only difficulty I see with your approach is that the ft() gets the expression as an argument so nounification of the argument ft('expr, ...) does not work. I have created a code repo on GitHub for this project: https://github.com/dprodanov/maximaft/ You can get the package and propose the changes. best regards, Dimiter > ------------------------------ > > Message: 4 > Date: Thu, 13 Mar 2014 02:07:41 +0000 (UTC) > From: Robert Dodier > Subject: Re: [Maxima-discuss] question about function identification > To: maxima-discuss@... > Message-ID: > > I'm pretty sure this stuff can be simplified somewhat. I think > that's important, since it may mean the difference between getting > something working, or not. > > On 2014-03-12, Dimiter Prodanov wrote: > > > defrule(ft_rect, FT(_rect(t, T)), 1/abs(T)*'sinc(f,1/T)), > > > _rect(t,T):= block( > > if abs (t)<= T/2 then return(1) > > else return (0) > > )\$ > > Here's enough machinery to make this one rule work. > > declare (FT, linear); > matchdeclare (t, symbolp); > matchdeclare (T, all); > defrule (ft_rect, FT ('rect (t, T)), 1/abs(T)*'sinc(f, 1/T)); > rect (t, T) := if abs(t) <= T/2 then 1 else 0; > > FT_via_rules (e) := apply1 (e, ft_rect); > > E.g.: > > foo : - 'rect (u, Z) + 2*'ramp (s, a); > FT_via_rules (1 + FT (foo)); > => -'sinc(f,1/Z)/abs(Z)+2*FT('ramp(s,a))+1 > > For every function like rect, there will be another defrule and function > definition. To handle any cases not matched by those rules, we'll need > a function to attempt the integral. Probably one or more rules will > come into play there as well. > > best > > Robert Dodier > > > > ```
 Re: [Maxima-discuss] Speed up maxima, faster arrays, only use floats From: Raymond Toy - 2014-03-13 16:39:10 ```>>>>> "exoon" == exoon writes: exoon> Hello, exoon> My worksheets are script generated and I want to calculate dynamic exoon> systems. There are a lot off states that depent on each other and I tell exoon> maxima to calulate step by step. For example: exoon> a0[n]:=if n=0 then a0_startvalue else < ... expression that uses exoon> a0[n-1], a1[n-1] ... > exoon> a1[n]:=if n=0 then a1_startvalue else < ... expression that uses exoon> a0[n-1], a1[n-1] ... > exoon> ... I think you need to provide a small example of exactly what you're trying to do. It's really hard to know from this on what's slow and how to make it faster. Ray ```
 [Maxima-discuss] limit(x^2*sin(1/x)/sin(x),x,0) From: Evgeniy Maevskiy - 2014-03-13 10:58:54 ```Hello, List! f:x^2*sin(1/x)/sin(x); limit(f,x,0); - is not working. But this: limit(x^2*sin(1/x)/(x-x^3/6),x,0); - is OK. Therefore we can subst: subst(sin=lambda([t],if limit(t,x,0)=0 then ratdisrep(taylor(sin(t),t,0,3)) else sin(t)),f); Is it possible to make appropriate changes in limit.lisp? With respect, Evgeniy Maevskiy ```
 Re: [Maxima-discuss] levels of comments in Maxima From: Gunter Königsmann - 2014-03-13 10:04:37 Attachments: Message as HTML ```If there was such a thing it would perhaps enable to save a wxmaxima sheet as .mac file in a way that on opening the file would return captions to be captions and text cells to be text cells. On 13. März 2014 10:49:55 MEZ, Tamas Papp wrote: >Hi, > >Is there a de facto convention for comment levels in Maxima? Eg some >Common Lisp code uses ; for end of the line comments, ;; for inside a >block, ;;; for section headings, ;;;; for headers, etc. Is there an >analogue in Maxima? > >I am asking because I want to use Emacs's outline minor mode with >Maxima >code, and need some way of marking the levels. I thought of > >/**** level 1 */ >/*** level 2 */ >/** level 3 */ > >etc. but maybe there is another de facto standard. > >Best, > >Tamas > > >------------------------------------------------------------------------------ >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/13534_NeoTech >_______________________________________________ >Maxima-discuss mailing list >Maxima-discuss@... >https://lists.sourceforge.net/lists/listinfo/maxima-discuss -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.```
 [Maxima-discuss] levels of comments in Maxima From: Tamas Papp - 2014-03-13 09:50:15 ```Hi, Is there a de facto convention for comment levels in Maxima? Eg some Common Lisp code uses ; for end of the line comments, ;; for inside a block, ;;; for section headings, ;;;; for headers, etc. Is there an analogue in Maxima? I am asking because I want to use Emacs's outline minor mode with Maxima code, and need some way of marking the levels. I thought of /**** level 1 */ /*** level 2 */ /** level 3 */ etc. but maybe there is another de facto standard. Best, Tamas ```
 [Maxima-discuss] prettified PDF/LaTeX session From: Tamas Papp - 2014-03-13 09:10:52 ```Hi, I have some Maxima code that shows some results analytically for a paper. The paper has proofs that I wrote up manually, but a lot of the non-essential algebra steps are skipped ("relegated to the appendix"), they were done with Maxima. I would like to have the Maxima session (inputs and outputs) available as a PDF appendix. I will of course include the Maxima source, too, but I have to think of readers (especially referees) who don't want to run it (either because they are not computer-savvy, or don't want to invest the time in learning yet another framework). It would be very nice to have outputs formatted with LaTeX, or have the session as LaTeX code which I could compile to a PDF, maybe after some manual editing. The question is: what's the recommended way of doing this? Best, Tamas PS.: I would prefer not to switch to wxmaxima. ```
 [Maxima-discuss] Speed up maxima, faster arrays, only use floats From: exoon - 2014-03-13 08:53:34 ```Hello, My worksheets are script generated and I want to calculate dynamic systems. There are a lot off states that depent on each other and I tell maxima to calulate step by step. For example: a0[n]:=if n=0 then a0_startvalue else < ... expression that uses a0[n-1], a1[n-1] ... > a1[n]:=if n=0 then a1_startvalue else < ... expression that uses a0[n-1], a1[n-1] ... > ... Everything works, but it is very slow. There are about 100 States, yes it is much, but it needs almost 10 Minutes to calculate about 1500 Steps. From my experience, I can say, calculation would not need more than some seconds, if it would done by c/c++ for example. So far I tried to set up all values as float(...), but calculating time is not decreasing. I'd like to use maxima, cause I need the plotting interface, so I hope there is a solution. What about the arrays? Can I tell maxima wich size is needed, so there is no overhead for resizing them? What else can I try? Thx. ```
 Re: [Maxima-discuss] erlang calculations From: Robert Dodier - 2014-03-13 02:15:38 ```On 2014-03-05, Lodder, Josje wrote: > Can you do Erlang calculations with Maxima, apart from defining > the functions by yourself? I know that there are Erlangcalculators > available via internet, but it would be nice if you can do things > like that also with Maxima, Josje lodder I was interested in trying to create a solved problems blog, so I worked up some code [1] and posted a write-up about it [2]. The write up was composed in wxMaxima, and then I generated the blog text (with Maxima output as MathML and plots as SVG) via a Perl script. Comments welcome. [1] https://drive.google.com/file/d/0B1LNdPwd64e4dGd3SU50S2FseXM/edit?usp=sharing [2] http://maxima-solved.blogspot.com/2014/03/erlang-c-formula-in-maxima.html best, Robert Dodier ```
 Re: [Maxima-discuss] question about function identification From: Robert Dodier - 2014-03-13 02:08:15 ```I'm pretty sure this stuff can be simplified somewhat. I think that's important, since it may mean the difference between getting something working, or not. On 2014-03-12, Dimiter Prodanov wrote: > defrule(ft_rect, FT(_rect(t, T)), 1/abs(T)*'sinc(f,1/T)), > _rect(t,T):= block( > if abs (t)<= T/2 then return(1) > else return (0) > )\$ Here's enough machinery to make this one rule work. declare (FT, linear); matchdeclare (t, symbolp); matchdeclare (T, all); defrule (ft_rect, FT ('rect (t, T)), 1/abs(T)*'sinc(f, 1/T)); rect (t, T) := if abs(t) <= T/2 then 1 else 0; FT_via_rules (e) := apply1 (e, ft_rect); E.g.: foo : - 'rect (u, Z) + 2*'ramp (s, a); FT_via_rules (1 + FT (foo)); => -'sinc(f,1/Z)/abs(Z)+2*FT('ramp(s,a))+1 For every function like rect, there will be another defrule and function definition. To handle any cases not matched by those rules, we'll need a function to attempt the integral. Probably one or more rules will come into play there as well. best Robert Dodier ```

Showing 10 results of 10