Primi passi in Mathematica

pt, novembre 1994

1 + 1

100!

a = 100!;

a

2 == 1 + 1

a == 1 + 1

A := 100

A

a

Esploriamo la differenza tra = e :=

                                 (calcolo immediato o differito)

x = 3;

y = x;

yy := x;

y

yy

x = 30;

y

yy

z = y; 
zz := y; 
z2 = yy; 
zz2 := yy;

{z, zz, z2, zz2}

x = 50;

{z, zz, z2, zz2}

f[x_] := x + 2

f[10]

g[x_] = x + 20

g[10]

Per finire, un bel grafico

Plot3D[Sin[x] + Sin[y], {x, 0, 3}, {y, 0, 3}]

Information["Plot3D", LongForm -> True]

Plot3D[
      Sin[x] + Sin[y], {x, 0, 3}, {y, 0, 
        3}, {Shading -> False}]

Plot3D[
      Sin[x] + Sin[y], {x, 0, 3}, {y, 0, 
        3}, {Lighting -> False}]

Plot3D[
      Sin[x] + Sin[y], {x, 0, 3}, {y, 0, 3}, {Mesh -> False}]

Plot3D[
      Sin[x] + Sin[y], {x, 0, 3}, {y, 0, 3}, {Mesh -> False, 
        Shading -> False}]