Anda di halaman 1dari 6

KELOMPOK 2

- FITRIANI
- JAMALUDDIN
- FAUZIAH NURAINI

-MELA FLORENCE
-WULAN SALLE KARURUNG
-MUH.ARIF

POLYVAL dan POLYFIT


load tugasku.dat
t = (0: 0.1: 5)';
x = tugasku (:,1);
olh
X = erf(t);
p = polyfit(t,X,1)
f = polyval(p,t);
plot (t,X,'O',t,f,'-')
axis([0 5 0 2])
grid on

2
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0

0.5

1.5

2.5

3.5

4.5

PLOT 3 (X,Y,Z)
load tugasku.dat
t = (1:1/200:1+199/200);
x = tugasku (:,1);
y = tugasku (:,2);
z = tugasku (:,3);
plot (t,x,t,y,t,z);
grid on

0.15

0.1

0.05

-0.05

-0.1

-0.15

-0.2

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

PLOT 1 (X)
load tugasku.dat
t = (1:1/200:1+199/200);
x = tugasku (:,1);
plot (t,x);
grid on

0.02
0.015
0.01
0.005
0
-0.005
-0.01
-0.015
-0.02
-0.025
-0.03

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

PLOT 2 (X,Y)
load tugasku.dat
t = (1:1/200:1+199/200);
x = tugasku (:,1);
y = tugasku (:,2);
plot (t,x,t,y);
grid on

0.02
0.015
0.01
0.005
0
-0.005
-0.01
-0.015
-0.02
-0.025
-0.03

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

menggunakan subplot
load tugasku.dat
t = (1:1/200:1+199/200);
x = tugasku (:,1);
subplot (2,4,[1 2]);
plot (t,x);
grid on
y = tugasku (:,2);
subplot (2,4,[3 4]);
plot (t,x,t,y);
grid on
z = tugasku (:,3);
subplot (2,4,[5 6]);
plot (t,x,t,y,t,z);
grid on

0.02

0.02

0.01

0.01

-0.01

-0.01

-0.02

-0.02

-0.03

1.5

-0.03
2
1

1.5

0.2
0.1
0
-0.1
-0.2

1.5