%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.
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