1 Jan 09:01 2008

### Re: Solving linear algebraic eqns. in vector (matrix) notation ?

```I've figured out myself how to solve this. It took me some time to
realise that equations and unknowns have to be in lists in order to
solve them with "solve" or "linsolve". I also realised that I do not
need "eigen". Something like transforming matrix m into equation list like:

(%i9) eqns : makelist(m[i][1]=0,i,1,6);
(%o9) [- n2  + n1  - eps  = 0, - n2  + n1  - eps  + eps  = 0,
1     1      1          2     2      2      1
eps    eps
2      1
- n2  + n1  + eps  = 0, - n2  + n1  + eps  = 0, - n2  + n1  - ---- -
---- = 0,
3     3      2          4     4      1          5     5    2      2
n1  - n2  = 0]
6     6

and solving by:

(%i10) linsolve(eqns,n2);
(%o10) [n2  = n1  - eps , n2  = n1  - eps  + eps , n2  = n1  + eps ,
1     1      1    2     2      2      1    3     3      2
- 2 n1  + eps  + eps
5      2      1
n2  = n1  + eps , n2  = - ---------------------, n2
= n1 ]
4     4      1    5               2
6     6

will do the job. I should have read the manual more carefuly, sorry.
Anyway, I've learned some new things.
```

2 Jan 00:26 2008

### Re: itensor - contracting antisymmetric and symmetric indices

```In theory, Itensor should be able to do this:

(%i2) decsym(A,2,0,[anti(all)],[]);
(%o2)                                done
(%i3) decsym(S,0,2,[],[sym(all)]);
(%o3)                                done
(%i4) ishow(A([i,j],[])*S([],[i,j]))\$
i j
(%t4)                              S    A
i j
(%i5) canform(%);
(%o5)                                  0

Well, it doesn't, not yet anyway. It's on my rather longish to-do list. In
the meantime, here's an alternative that may be sometimes useful:

(%i2) decsym(S,0,2,[],[sym(all)]);
(%o2)                                done
(%i3) components(A([i,j],[]),1/2*(aa([i,j],[])-aa([j,i],[])));
(%o3)                                done
(%i4) ishow('A([i,j],[])*S([],[i,j]))\$
i j
(%t4)                              S    A
i j
(%i5) canform(ev(%,A));
(%o5)                                  0

Viktor
```

1 Jan 16:19 2008

### matrices to plot'ing list

```Hello!

I have 2 matrix 11x1:

(%i1) x:matrix([-3.6],[-3.08],[-2.56],[-2.04],[-1.52],[-1],[-0.48],[0.04],[0.56],[1.08],[1.6])\$

(%i2) y:matrix([-2.397],[-0.401],[-0.577],[-1.268],[-0.933],[-0.359],[1.107],[1.300],[1.703],[-0.299],[-1.417])\$

What's the easy way to plot this 11 points? My problem is to transform
this 2 matrices to this style:

(%i12) xx:[10, 20, 30, 40, 50]\$
(%i13) yy:[.6, .9, 1.1, 1.3, 1.4]\$
(%i14) xy:[[10,.6], [20,.9], [30,1.1], [40,1.3], [50,1.4]]\$
```
2 Jan 09:01 2008

### Re: matrices to plot'ing list

```dear Mansur,

please look at the functions of package 'draw', e.g. points.
There you will find many examples.
Package 'descriptive' should offer possibilities, too.

HTH Wolfgang

"Mansur Marvanov" <nanorobocop <at> gmail.com> schrieb:
> Hello!
>
> I have 2 matrix 11x1:
>
> (%i1) x:matrix([-3.6],[-3.08],[-2.56],[-2.04],[-1.52],[-1],[-0.48],[0.04],[0.56],[1.08],[1.6])\$
>
> (%i2) y:matrix([-2.397],[-0.401],[-0.577],[-1.268],[-0.933],[-0.359],[1.107],[1.300],[1.703],[-0.299],[-1.417])\$
>
> What's the easy way to plot this 11 points? My problem is to transform
> this 2 matrices to this style:
>
> (%i12) xx:[10, 20, 30, 40, 50]\$
> (%i13) yy:[.6, .9, 1.1, 1.3, 1.4]\$
> (%i14) xy:[[10,.6], [20,.9], [30,1.1], [40,1.3], [50,1.4]]\$
> _______________________________________________
> Maxima mailing list
> Maxima <at> math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
```
2 Jan 12:19 2008

### Re: Rounding

```Try ceiling, floor, and round.

Barton

-----maxima-bounces <at> math.utexas.edu wrote: -----

>To: maxima <at> math.utexas.edu
>From: Holger Schulz <qdl <at> gmx.net>
>Sent by: maxima-bounces <at> math.utexas.edu
>Date: 01/02/2008 05:45AM
>Subject: [Maxima] Rounding
>
>I haven't found functions for rounding/truncating rational numbers
>yet. Are there some? How are they called?
>
>Thanks
>
>hs
>_______________________________________________
>Maxima mailing list
>Maxima <at> math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
```
2 Jan 12:28 2008

### Re: Rounding

```Holger,

there are 'floor' and 'ceiling', which do what their names suggest.

(%i1) floor(-22/3);
(%o1)                                 - 8
(%i2) ceiling(-22/3);
(%o2)                                 - 7

They can deal with more than only rational numbers. Type
? floor
or
? ceiling

Also there are 'fix' and 'entier' (two names for one function), which as far as I know do
nothing different than 'floor'.

Volker van Nek

Am 2 Jan 2008 um 11:45 hat Holger Schulz geschrieben:

> I haven't found functions for rounding/truncating rational numbers
> yet. Are there some? How are they called?
>
> Thanks
>
> hs
> _______________________________________________
> Maxima mailing list
```

2 Jan 13:04 2008

### Re: matrices to plot'ing list

```
> (%i1) x:matrix([-3.6],[-3.08],[-2.56],[-2.04],[-1.52],[-1],[-0.48],[0.04],[0.56],[1.08],[1.6])\$
>
> (%i2) y:matrix([-2.397],[-0.401],[-0.577],[-1.268],[-0.933],[-0.359],[1.107],[1.300],[1.703],[-0.299],[-1.417])\$
>
> What's the easy way to plot this 11 points?
>

--

--
Mario Rodriguez Riotorto
www.biomates.net
```
2 Jan 13:27 2008

### Re: matrices to plot'ing list

```
On Tue, 2008-01-01 at 18:19 +0300, Mansur Marvanov wrote:
> I have 2 matrix 11x1:
>
> (%i1) x:matrix([-3.6],[-3.08],[-2.56],[-2.04],[-1.52],[-1],[-0.48],[0.04],[0.56],[1.08],[1.6])\$
>
> (%i2) y:matrix([-2.397],[-0.401],[-0.577],[-1.268],[-0.933],[-0.359],[1.107],[1.300],[1.703],[-0.299],[-1.417])\$
>
> What's the easy way to plot this 11 points? My problem is to transform
> this 2 matrices to this style:
>
> (%i12) xx:[10, 20, 30, 40, 50]\$
> (%i13) yy:[.6, .9, 1.1, 1.3, 1.4]\$
> (%i14) xy:[[10,.6], [20,.9], [30,1.1], [40,1.3], [50,1.4]]\$

Wolfgang Lindner has already told you what he thinks is the easiest way.
In my opinion, the easiest way is the following:

(%i3) xx: transpose(x)[1]\$

(%i4) yy: transpose(y)[1]\$

(%i5) plot2d([discrete,xx,yy],[style,points])\$

Regards,
Jaime Villate
```
2 Jan 16:39 2008

### Re: Evaluating boolean expressions

```
On Wed, 2008-01-02 at 13:50 +0100, Holger Schulz wrote:
> but that doesn't work for boolean expression. I expected 5>3 to be
> evaluated to true. But it wasn't:
>
>
> (%i42) 5>3;
>
> (%o42) 5>3
>
> Is there any trick to force the evaluation of boolean expressions?

(%i1) is(5>3);
(%o1) true
```
2 Jan 16:41 2008

### Re: Evaluating boolean expressions

```Holger Schulz escribiÃ³:
> Numeric expressions are evaluated, like
>
> (%i37) 5-3;
>
> (%o37) 2
>
> but that doesn't work for boolean expression. I expected 5>3 to be
> evaluated to true. But it wasn't:
>
>
> (%i42) 5>3;
>
> (%o42) 5>3
>
> Is there any trick to force the evaluation of boolean expressions?
>
>
try

is(5>3);

The 'is' command is not necessary in other contexts:

if 5>3 then 1 else 0;

or

5>3 or 2>4;

```