Anda di halaman 1dari 2

Energi Potensial Coding in Matlab

%graphic energi potensial clc; %input m=input('massa = '); %process g=10; h=0:0.1:50; EP=m*g*h; %output plot(h,EP,'b') xlabel('x axis');ylabel('y axis'); title('Energi Potensial'); grid on;
Testing and Verification. massa = 10

E iP s n o il e tn r ea g 5 0 0 0 4 5 0 0 4 0 0 0 3 5 0 0 3 0 0 0 ya i xs 2 5 0 0 2 0 0 0 1 5 0 0 1 0 0 0 5 0 0 0 0

1 0

1 5

2 0

2 5 xi a x s

3 0

3 5

4 0

4 5

5 0

Viskositas
Coding in Matlab

%graphic viskositas clc; %input n=input('koefisien viskositas fluida='); v=input('kelajuan bola='); %process r=0.5:0.001:1; Fs=6*pi*n*r*v; %output plot(r,Fs,'b') xlabel('x axis');ylabel('y axis'); title(['Viskositas zat cair',';','n=',num2str(n),';','v=',num2str(v)]); grid on;
Testing and Verification.

koefisien viskositas fluida=1.5 kelajuan bola=0.01


Visc== i o za10 st ar .v1 k t in; . s a ; 50 0 . 3 2 0 . 3 0 . 2 8 0 . 2 6 yai x s 0 . 2 4 0 . 2 2 0 . 2 0 . 1 8 0 . 1 6

0 . 5

0 . 5 5

0 . 6

0 . 6 5

0 . 7

0 . 7 5 x a x i s

0 . 8

0 . 8 5

0 . 9

0 . 9 5

Anda mungkin juga menyukai