• Keine Ergebnisse gefunden

STUDENT > plot(f(x),x=-2..2);

N/A
N/A
Protected

Academic year: 2021

Aktie "STUDENT > plot(f(x),x=-2..2);"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

STUDENT > # Comp Lab 1: Introduction to CAS/MAPLE STUDENT >

STUDENT > # 1.functions of one variable STUDENT > f:=x->x^2;

STUDENT > f(5);

STUDENT > plot(f(x),x=-2..2);

STUDENT > g:=x->sqrt(x);

STUDENT > g(2);

STUDENT > evalf(g(2));

STUDENT > Digits:=3;

STUDENT > evalf(g(2));

STUDENT >

STUDENT > # 2. Bands of functions

STUDENT > plot({x^2,x^3,sin(x)},x=-2..2);

STUDENT >

STUDENT > # 3. Sequences

STUDENT > L:=[seq([n,1/n],n=1..10)];

STUDENT > L[4];

STUDENT > plot(L, style=point);

STUDENT > plot(L,style=line);

STUDENT >

STUDENT > # 4. Recursive sequences: E.g. Fibonacci's-sequence (rabbits)

STUDENT > n:=20: l:=vector(n);

STUDENT > l[1]:=1: l[2]:=1: # initial values

STUDENT > for i from 3 to n do l[i]:=l[i-1]+l[i-2] od:

STUDENT > l1:=[seq([i,l[i]],i=1..n)]:

STUDENT > plot(l1,style=line);

STUDENT >

STUDENT >

STUDENT > # 5. Functions with two variables STUDENT > f:=(x,y)->sin(x)*sin(y);

STUDENT > evalf(f(1,1));

STUDENT > Digits:=3;

STUDENT > evalf(f(1,1));

STUDENT > plot3d(f(x,y),x=-6..6,y=-6..6);

STUDENT > # Try various graphic representations: Surfaces, Wire-frame, Level-lines, Surfaces,

STUDENT > # style = patch, wireframe, contour.

STUDENT > plot3d(f(x,y),x=-6..6,y=-6..6,style=patch, axes=boxed);

STUDENT >

STUDENT > # 6. Bands of functions STUDENT > plot3d({x+y,

sin(x)*sin(y)},x=-2..2,y=-2..2,style=patch);

STUDENT >

STUDENT > # 7. Spacecurves/Parametercurves STUDENT > with(plots):

Page 1 Maple V Release 5 - Student Version

(2)

STUDENT > spacecurve([sin(t),cos(t),0.2*t],t=0..48,numpoints=250, axes=boxed, title='Screwline');

STUDENT > spacecurve({[sin(t),cos(t),t],[0,0,t]},t=0..48,numpoints

=250);

STUDENT >

Page 2 Maple V Release 5 - Student Version

Referenzen