Analisa Kinerja Sistem - Blog Sivitas STIKOM Surabaya
Analisa Kinerja Sistem - Blog Sivitas STIKOM Surabaya
Analisa Kinerja Sistem - Blog Sivitas STIKOM Surabaya
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 2.Pengantar MATLABfigure(1);plot(x,y,’go’,x,true)figure(2);plot(x,abs(true-y),’mx’)Kedua gambar hasil dari plotting di atas dapat digabungkan ke dalam satubuah frame dengan perintah subplot.figure(3);subplot(1,2,1);plot(x,y,’go’,x,true)subplot(1,2,2);plot(x,abs(true-y),’mx’)Lanjutkan dengan mengetikkan code MATLAB di bawah ini:clfh = h/2;x1 = 0:h:1;y1 = 0*x1;y1(1) = 1;for i=2:max(size(y1)),y1(i) = y1(i-1) + h/y1(i-1);endtrue1 = sqrt(2*x1+1);plot(x1,y1,’go’,x1,true1)plot(x1,abs(true1-y1),’mx’)subplot(1,2,1);plot(x,abs(true-y),’mx’)subplot(1,2,2);plot(x1,abs(true1-y1),’mx’)25