1.Test of Octave plugin

1.1.Conversion of Octave types to Scheme representation

1.1.1.Direct insertion of object types

octave>

1:4

( 1 2 3 4 )

octave>

rand(2)

( 0.17439 0.22825 0.20509 0.76252 )

octave>

[1+i 2;3 1-i]

( 1+1𝒊 2 3 1-1𝒊 )

octave>

[1 2;3 4] == [2 1;3 4]

( 0 0 1 1 )

octave>

1

1

octave>

1+i

1+1𝒊

octave>

1==2

0

octave>

struct ("field1", 1, "field2", 2)

scalar structure containing the fields: field1 = 1

field2 = 2

octave>

"a"

a

octave>

'a'

a

octave>

{1,2,3}

{ [1,1] = [1,3] = 1 [1,4] = 2 [1,5] = 3 [1,6] =

}

octave>

1.1.2.Assignment of object types

octave>

a=1:4

( 1 2 3 4 )

octave>

A=rand(2)

( 0.014813 0.86411 0.28565 0.31234 )

octave>

B=[1+i 2;3 1-i]

( 1+1𝒊 2 3 1-1𝒊 )

octave>

C=[1 2;3 4] == [2 1;3 4]

( 0 0 1 1 )

octave>

x=1

1

octave>

y=1+i

1+1𝒊

octave>

b=1==2

0

octave>

s=struct ("field1", 1, "field2", 2)

scalar structure containing the fields: field1 = 1

field2 = 2

octave>

s1="a"

a

octave>

s2='a'

a

octave>

l={1,2,3}

{ [1,1] = [1,3] = 1 [1,4] = 2 [1,5] = 3 [1,6] =

}

octave>

A

( 0.014813 0.86411 0.28565 0.31234 )

octave>

x=0:0.01:6.28; y=sin(x);

octave>

plot(x,y);

octave>

A=( 0.79154 0.96829 0.64617 0.044896 0.93136 0.30283 0.83769 0.059582 0.1801 )
A-1=( -1.0245 0.92996 2.1119 -1.6807 2.7288 1.4419 5.3211 -5.2283 -4.7478 )

2.Test of Gnuplot

GNUplot]

plot sin(x)

GNUplot]

3.Test of Mathematica

Mathematica

In[5]:=

Integrate[Sin[x],x]

-cos(x)

In[8]:=

DSolve[{y'[x]+y[x]==Sin[x],y[0]==0},y[x],x]

{{y(x)-12e-x(-exsin(x)+excos(x)-1)}}

In[9]:=

4.Test of python

Python]

from pylab import *

Python]

x=arange(0.,3.15,.01); y=cos(x); plot(x,y);

Python]

show();

Python]

ps_out('/home/student/courses/texmacs/Figure_1.eps')

Python]