You are on page 1of 1

SYNTAX MATLAB

BAB I
EKSPERIMEN 1
HUKUM OHM

1. Grafik Perbandingan Nilai Percobaan dengan Teori Saklar 1 ON Resistor 10


Ohm
A=[0 2 3 5 10];
B=[0 0.2 0.3 0.5 1];
C=[0 0.2 0.3 0.5 1];
figure;subplot(1,1,1);
h1=plot(A,B,'r-o',A,C,'b--o');
set(h1,'LineWidth',1.5);
legend('Teori','Pengukuran');
grid on;
xlabel('V (Volt)');
ylabel('I (Ampere)');
set(gca,'YTick',[0 0.2 0.3 0.5 1]);
set(gca,'XTick',[0 2 3 5 10]);
title({'Grafik Perbandingan Nilai Percobaan dengan Teori Saklar 1
ON Resistor 10 Ohm'
'I Nyoman Oksa Winanta - 1404405068'
'Kelompok 10'});

2. Grafik Perbandingan Nilai Percobaan dengan Teori Saklar 2 ON Resistor 20


Ohm
A=[0 2 3 5 10];
B=[0 0.1 0.15 0.25 0.5];
C=[0 0.1 0.15 0.25 0.5];
figure;subplot(1,1,1);
h1=plot(A,B,'r-o',A,C,'b--o');
set(h1,'LineWidth',1.5);
legend('Teori','Pengukuran');
grid on;
xlabel('V (Volt)');
ylabel('I (Ampere)');
set(gca,'YTick',[0 0.1 0.15 0.25 0.5]);
set(gca,'XTick',[0 2 3 5 10]);
title({'Grafik Perbandingan Nilai Percobaan dengan Teori Saklar 2
ON Resistor 20 Ohm'
'I Nyoman Oksa Winanta - 1404405068'
'Kelompok 10'});

You might also like