clc;disp('==========================================================================================');disp('= =');disp('= PROGRAM PERANCANGAN TANGKI PENGADUK (MIXING) =');disp('= =');disp('==========================================================================================');disp('');disp('');disp(' ===============================');disp(' = Pilih Jenis Larutan =');disp(' ===============================');disp('=====================');disp('=1. Larutan NaCl =');disp('=2. Larutan C6H12O6 =');disp('=====================');pil=input ('Masukkan Pilihan larutan= ');clc;switch pil case 1 disp(' ==================================='); disp(' = Larutan NaCl ='); disp(' ==================================='); n=input ('Masukkan kecepatan pengaduk (rps)= '); d=input ('Masukkan diameter pengaduk (m)= '); disp('=========================================================================================='); disp(' Densitas Kec. Pengaduk Diameter Pengaduk Viskositas NRe Jenis Aliran '); disp(' (Kg/m^3) (Rps) (m) (Kg/Ms) '); disp('=========================================================================================='); for a=n:2:10; den=2160; vis=0.94; nre=(den*a*d)/vis; if nre<2000 c='ALIRAN LAMINER'; elseif nre>2000 & nre<4000 c='ALIRAN TRANSISI'; else c='ALIRAN TURBULEN'; end;fprintf('%8.2f%13.2f%19.2f%18.2f%14.2f%18s\n',den,a,d,vis,nre,c); end; disp(''); disp(''); disp(' ==================================='); disp(' = Menghitung Power Tangki ='); disp(' ==================================='); p=input ('Input power (watt)= '); disp(''); disp('============================================================================================================='); disp(' Power Kec. Pengaduk Diameter Pengaduk Densitas Konstanta Gravitasi NRe power Number '); disp('(Watt) (Rps) (m) (Kg/m^3) (Kg.m/N.S^2) (Kg.m^2/S^2) '); disp('============================================================================================================='); while n<=10 g=1; Np=(n.^3*d.^3*den)/p*g; fprintf('%8.2f%13.2f%19.2f%18.2f%14.2f%19.2f%18.2f\n',p,n,d,den,g,nre,Np); n=n+2; plot(Np,nre,'--r*','linewidth',2,'markeredgecolor','g'); hold on; grid on; set(gca,'fontsize',12); title('Grafik Hubungan Nre Vs Power Number','fontweight','bold','fontsize',12); xlabel('Power Number (Kg.m^2/S^2)'); ylabel('Nre'); end;end;
MATLAB: There is no line in the graph
graph
Best Answer