Idea Transcript
SlideShare Explore Search You
Upload Login Signup
Search
Submit Search
Home Explore Presentation Courses PowerPoint Courses by LinkedIn Learning Search Successfully reported this slideshow. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
MEMBUAT GRAFIK DENGAN MATLABSalah satu kelebihan dari Matlab adalah kemudahan dalam mengolah grafik. Sehinggakita tidak pe... Contoh 2 : Menampilkan 2 grafik dalam 1 bidangSekarang ketikkan:t= [0:0.01:10];x = cos(t);y = sin (t);plot(t,x,b--)hold on... Contoh 3 : Menampilkan 2 grafik dalam 2 bidang (terpisah)Sekarang ketikkan:t= [0:0.01:10];x = cos(t);y = sin (t);subplot(2... Matlab juga bisa menampilkan grafik 3 dimensi :Sekarang ketikkan :t= [0:0.01:10];plot3(t,4*t,sin(t))gridxlabel(Waktu(s))yl... PENYELESAIAN MATRIKS DENGAN MATLABContoh Soal:1. Buatlah matriks A dan B ordo 4x4, dan tentukan :a. Invers matriks A dan B... Jawab :>> A=[ 6 5 8 7 ; 4 6 7 4 ; 3 4 2 8 ; 8 4 6 2 ]A =6 5 8 74 6 7 43 4 2 88 4 6 2>> B=[ 5 4 6 7 ; 5 7 8 9 ; 8 6 4 2 ; 8... ans =149 130 110 119117 107 95 9998 91 73 92104 90 92 96c. Invers A x B>> inv(A)*Bans =1.2262 0.6689 -0.3279 -0.22301.4951... B =4 4 4 44 4 4 44 4 4 44 4 4 4f. Pangkatkan dengan 2 setiap matriks A dan B>> A.^2ans =16 16 16 1616 16 16 1616 16 16 161... PENYELESAIAN PERSAMAAN LINEAR DENGAN MATLABContoh Soal :1. Ubah persamaan liner berikut menjadi persamaan matriks dan cari... >> x1=5.9000;x2=-17.3000;x3=10.0000;x4=-5.3000;>> X=[x1;x2;x3;x4]X=5.9000-17.300010.0000-5.3000MEMBUAT PENYELESAIAN GRAFIK... GRAFIK STEM- Bahasa programnyan=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4stem(x,A,bp)hold onstem(x,B,rs)hold ontitle(Grafik Tu... GRAFIK BARBahasa Programnya:n=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4bar(x,A,bp)hold onbar(x,B,rs)hold ontitle(Grafik Tugas ... GRAFIK STAIRSBahasa Programnya:n=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4stairs(x,A,bp)hold onstairs(x,B,rs)hold ontitle(Graf... Tutorialmatlab Upcoming SlideShare Loading in …5 × 1 of 15
Tutorialmatlab 339 views Share Like Download ...
Sholikhin Rahmatullah Follow Published on Jun 9, 2013
0 Comments 0 Likes Statistics Notes
Full Name Comment goes here. 12 hours ago Delete Reply Spam Block Are you sure you want to Yes No Your message goes here
Share your thoughts… Post Be the first to comment Be the first to like this
No Downloads Views Total views 339 On SlideShare 0 From Embeds 0 Number of Embeds 4 Actions Shares 0 Downloads 6 Comments 0 Likes 0 Embeds 0 No embeds No notes for slide
Tutorialmatlab 1. 1. TUTORIAL MATLABContoh Transformasi Laplace :Tentukan transformasi laplace dari fungsi ini f = sin2t ?Jawab:Command windows :>> f=sym(sin(2*t))f =sin(2*t)>> g=laplace(f)g =2/(s^2+4)Atau pada M-file :syms t %f=sym(sin(2*t))g=laplace(f)Lalu lihat hasilnya di Command Windows.Contoh Differensiala. Turunan pertama dari fungsi y>> syms x;>> y=x^3+2*x^2+6*x+7;>> z=diff(y)Akan muncul sebagai berikut :z =3*x^2+4*x+6b. Turunan kedua dari fungsi y>>z=diff(y,2)Akan muncul sebagai berikut :z =6*x+4 2. 2. MEMBUAT GRAFIK DENGAN MATLABSalah satu kelebihan dari Matlab adalah kemudahan dalam mengolah grafik. Sehinggakita tidak perlu kesulitan untuk melihat suatu respon system.• Command Plot>> Plot (X,Y,’ro’)>> Plot (Nilai fungsi,fungsi,’warna_garis/data_point’)• Colors : b(blue), r(red), g(green), y(yellow), m(magenta),c(cyan), k(black)• Markers : (o),(x),(*),(.),(+),(d),(s),(p),(h)• Line Style : (-),(:),(-.),(- -),Contoh grafik cosinus terhadap waktu. Kali ini kita akan mencoba menggunakan area kerja diM-file.Contoh 1:Sekarang ketikkan:t= [0:0.01:10];x = cos(t);plot(t,x,b--);xlabel(Waktu(s));ylabel(x(t));grid;title(Grafik Cosinus);ini akan menghasilkan gambar seperti berikut: 3. 3. Contoh 2 : Menampilkan 2 grafik dalam 1 bidangSekarang ketikkan:t= [0:0.01:10];x = cos(t);y = sin (t);plot(t,x,b--)hold onplot(t,y,r--)hold onxlabel(Waktu(s))ylabel(Amplitudo)gridtitle(Grafik Sinus & Cosinus)ini akan menghasilkan gambar seperti berikut: 4. 4. Contoh 3 : Menampilkan 2 grafik dalam 2 bidang (terpisah)Sekarang ketikkan:t= [0:0.01:10];x = cos(t);y = sin (t);subplot(2,1,1)plot(t,x,b--)grid onxlabel(Waktu(s))ylabel(Amplitudo)title(Grafik Sinus )subplot(2,1,2)plot(t,y,r--)grid onxlabel(Waktu(s))ylabel(Amplitudo)grid ontitle(Grafik Cosinus)ini akan menghasilkan gambar seperti berikut: 5. 5. Matlab juga bisa menampilkan grafik 3 dimensi :Sekarang ketikkan :t= [0:0.01:10];plot3(t,4*t,sin(t))gridxlabel(Waktu(s))ylabel(Amplitudo)title(Grafik Sinus )ini akan menghasilkan gambar seperti berikut: 6. 6. PENYELESAIAN MATRIKS DENGAN MATLABContoh Soal:1. Buatlah matriks A dan B ordo 4x4, dan tentukan :a. Invers matriks A dan Bb. A x (B – 1)c. Invers A x Bd. A2e. Elemen matriks A dan B dengan 4f. Pangkatkan dengan 2 setiap matriks A dan Bg. Determinan matriks A dan B 7. 7. Jawab :>> A=[ 6 5 8 7 ; 4 6 7 4 ; 3 4 2 8 ; 8 4 6 2 ]A =6 5 8 74 6 7 43 4 2 88 4 6 2>> B=[ 5 4 6 7 ; 5 7 8 9 ; 8 6 4 2 ; 8 7 4 6 ]B =5 4 6 75 7 8 98 6 4 28 7 4 6a. Invers matriks A dan B>> inv(A)ans =-0.0525 -0.1377 0.0623 0.2098-0.3902 0.3508 0.1508 0.06070.2820 -0.0098 -0.2098 -0.12790.1443 -0.1213 0.0787 -0.0770>> inv(B)ans =0.2809 -0.2697 0.0618 0.0562-0.4944 0.3146 0.0112 0.10110.1180 0.1067 0.2360 -0.37640.1236 -0.0787 -0.2528 0.2247b. A x (B – 1)>> A*(B-1) 8. 8. ans =149 130 110 119117 107 95 9998 91 73 92104 90 92 96c. Invers A x B>> inv(A)*Bans =1.2262 0.6689 -0.3279 -0.22301.4951 2.2246 1.3115 1.0918-1.3410 -1.0951 0.2623 0.69840.1279 -0.3393 -0.0984 -0.3869d. A2>> A^2ans =136 120 141 140101 100 112 116104 79 104 6998 96 116 124e. Elemen matriks A dan B dengan 4>> A=[ 4 4 4 4 ; 4 4 4 4 ; 4 4 4 4 ; 4 4 4 4 ]A =4 4 4 44 4 4 44 4 4 44 4 4 4>> B=[ 4 4 4 4 ; 4 4 4 4 ; 4 4 4 4 ; 4 4 4 4 ] 9. 9. B =4 4 4 44 4 4 44 4 4 44 4 4 4f. Pangkatkan dengan 2 setiap matriks A dan B>> A.^2ans =16 16 16 1616 16 16 1616 16 16 1616 16 16 16>> B.^2ans =16 16 16 1616 16 16 1616 16 16 1616 16 16 16g. Determinan matriks A dan B>> det Aans =65>> det Bans =66 10. 10. PENYELESAIAN PERSAMAAN LINEAR DENGAN MATLABContoh Soal :1. Ubah persamaan liner berikut menjadi persamaan matriks dan cari nilai x1, x2,x3, dan x4 !2x1 + x2 + 4x3 + 5x4 = 8x1 – 2x2 - 1x3 + 5x4 = 49x1 + 3x2 + 3x3 + 4x4 = 104x1 + 3x2 + 7x3 – 1x4 = 47Jawab :>> A = [2 1 4 5 ; 1 -2 -1 5 ; 9 3 3 4 ; 4 3 7 -1]A =2 1 4 51 -2 -1 59 3 3 44 3 7 -1>> B = [8;4;10;47]B =841047>> C = inv(A)*BC =5.9000-17.300010.0000-5.3000Maka Nilai-nilai dari x1,x2,x3dan x4 adalah: 11. 11. >> x1=5.9000;x2=-17.3000;x3=10.0000;x4=-5.3000;>> X=[x1;x2;x3;x4]X=5.9000-17.300010.0000-5.3000MEMBUAT PENYELESAIAN GRAFIK DENGAN MATLABCONTOH SOAL :1. Buat tampilan grafik plot, stem, bar, dan stair dari 2 persamaan dalam 1 grafik!:A = (3x+2)3Dimana : n = 5;B = 5x3+4 x = 0 : 1/n : 10JAWAB:GRAFIK PLOT- Bahasa programnyan=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4plot(x,A,bp)hold onplot(x,B,rs)hold ontitle(Grafik Tugas Meri)xlabel(X),ylabel(A dan B)gridlegend(A=(3*x+2).^3,B=(5*x.^3)+4)hold off 12. 12. GRAFIK STEM- Bahasa programnyan=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4stem(x,A,bp)hold onstem(x,B,rs)hold ontitle(Grafik Tugas Meri)xlabel(X),ylabel(A dan B)gridlegend(A=(3*x+2).^3,B=(5*x.^3)+4)hold off 13. 13. GRAFIK BARBahasa Programnya:n=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4bar(x,A,bp)hold onbar(x,B,rs)hold ontitle(Grafik Tugas Meri)xlabel(X),ylabel(A dan B)gridlegend(A=(3*x+2).^3,B=(5*x.^3)+4)hold off 14. 14. GRAFIK STAIRSBahasa Programnya:n=5x=0: 1/n :10A=(3*x+2).^3B=(5*x.^3)+4stairs(x,A,bp)hold onstairs(x,B,rs)hold ontitle(Grafik Tugas Meri)xlabel(X),ylabel(A dan B)gridlegend(A=(3*x+2).^3,B=(5*x.^3)+4)hold off
Recommended
Creative Inspirations: Duarte Design, Presentation Design Studio Online Course - LinkedIn Learning
Learning Management Systems (LMS) Quick Start Online Course - LinkedIn Learning
Blackboard 9.x Essential Training: Instructors Online Course - LinkedIn Learning
Tutorial Matlab achimm4ycry
My Mini Portfolio Shameem Sheik Hossen
Preparing For A Gateway Shannon Martinsen
Khadija Jones - Death Penalty Thesis Presentation Chavez Schools
Airport forecasting Mohammed Hadi
Sitra Addus Salaam - Universal Healthcare Thesis Presentation Chavez Schools
DaJohn Hart - Environmental Justice Thesis Presentation Chavez Schools English Español Português Français Deutsch About Dev & API Blog Terms Privacy Copyright Support
LinkedIn Corporation © 2018 × Share Clipboard × Email
Enter email addresses Add a message From
Send Email sent successfully.. Facebook Twitter LinkedIn Link Public clipboards featuring this slide
×
No public clipboards found for this slide ×
Save the most important slides with Clipping Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics. Start clipping No thanks. Continue to download. Select another clipboard ×
Looks like you’ve clipped this slide to already. Search for a clipboard Create a clipboard
You just clipped your first slide! Clipping is a handy way to collect important slides you want to go back to later. Now customize the name of a clipboard to store your clips. Name* Best of Slides
Description Add a brief description so others know what your Clipboard is about. Visibility Others can see my Clipboard Cancel Save Save this documentTap To Close