Sunteți pe pagina 1din 6

%MENGGUNAKAN FUNGSI diff dan find yang TERSEDIA DI MATLAB

vs=10; %TEGANGAN SUMBER


rs=10e3; %HAMBATAN SUMBER/HAMBATAN DALAM SUMBER
rl=0:2.5e3:50e3
rl =
Columns 1 through 6
0

2500

5000

7500

10000

12500

20000

22500

25000

27500

35000

37500

40000

42500

Columns 7 through 12
15000

17500

Columns 13 through 18
30000

32500

Columns 19 through 21
45000

47500

50000

%DAYA DISIPASI (pl)


k = length(rl); % KOMPONEN VEKTOR rl
for i=1:k
pl(i) = ((vs/(rs+rl(i)))^2)*rl(i)
end
pl =
0
pl =
0

0.0016

0.0016

0.0022

0.0016

0.0022

0.0024

0.0016

0.0022

0.0024

0.0025

0.0016

0.0022

0.0024

0.0025

pl =

pl =

pl =

pl =

pl =

0.0025

0.0016

0.0022

0.0024

0.0025

0.0025

0.0024

0.0022

0.0024

0.0025

0.0025

0.0024

0.0022

0.0024

0.0025

0.0025

0.0024

0.0022

0.0024

0.0025

0.0025

0.0024

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

pl =
Columns 1 through 7
0

0.0016

Column 8
0.0023
pl =
Columns 1 through 7
0

0.0016

Columns 8 through 9
0.0023

0.0022

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 10
0.0023

0.0022

0.0021

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 11
0.0023

0.0022

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 12
0.0023
pl =

0.0022

Columns 1 through 7
0

0.0016

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

Columns 8 through 13
0.0023

0.0022

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

Column 15
0.0017
pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

Columns 15 through 16
0.0017

0.0017

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

Columns 15 through 17
0.0017

0.0017

0.0016

pl =
Columns 1 through 7
0

0.0016

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

0.0016

0.0015

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

0.0016

0.0015

0.0015

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

0.0016

0.0015

0.0015

0.0014

0.0022

0.0024

0.0025

0.0025

0.0024

0.0021

0.0020

0.0020

0.0019

0.0018

Columns 8 through 14
0.0023

0.0022

Columns 15 through 18
0.0017

0.0017

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

Columns 15 through 19
0.0017

0.0017

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

Columns 15 through 20
0.0017

0.0017

pl =
Columns 1 through 7
0

0.0016

Columns 8 through 14
0.0023

0.0022

Columns 15 through 21
0.0017

0.0017

0.0016

0.0015

0.0015

0.0014

0.0014

%TURUNAN NILAI DAYA DISIPASI(pl) TERHADAP HAMBATAN BEBAN(rl)


dp = diff(pl)./diff(rl)
dp =
1.0e-06 *
Columns 1 through 7
0.6400

0.2489

0.0907

0.0204

-0.0123

-0.0277

-0.0344

-0.0357

-0.0341

-0.0322

-0.0303

-0.0284

-0.0217

-0.0204

-0.0191

Columns 8 through 14
-0.0367

-0.0368

Columns 15 through 20
-0.0265

-0.0248

-0.0232

rld = rl(2:length(rl)) % BANYAKNYA KOMPONEN DARI rld ADALAH KURANG 1 DARI BANYAK
NYA KOMPONEN rl
rld =
Columns 1 through 6
2500

5000

7500

10000

12500

15000

22500

25000

27500

30000

37500

40000

42500

45000

Columns 7 through 12
17500

20000

Columns 13 through 18
32500

35000

Columns 19 through 20
47500

50000

%MENCARI TITIK KRITIS DARI DATA HASIL PENURUNAN DAYA


prod = dp(1:length(dp) - 1).*dp(2:length(dp))
prod =
1.0e-12 *
Columns 1 through 7
0.1593

0.0226

0.0019

-0.0003

0.0003

0.0010

0.0013

0.0012

0.0011

0.0010

0.0009

0.0008

Columns 8 through 14
0.0014

0.0013

Columns 15 through 19
0.0007

0.0006

0.0005

0.0004

0.0004

crit_pt = rld(find(prod < 0))


crit_pt =
10000
max_power = max(pl) %daya maksimum
max_power =
0.0025
%PRINT HASIL
fprintf('Daya Maksimum terjadi saat %8.2f Ohms\n',crit_pt)
Daya Maksimum terjadi saat 10000.00 Ohms
fprintf('Daya disipasi maksimum adalah %8.4f Watts\n', max_power)
Daya disipasi maksimum adalah 0.0025 Watts
%PLOT DAYA DENGAN HAMBATAN BEBAN
title('Grafik Hubungan Daya terhadap Beban dengan Diff')
xlabel('Hambatan Beban dalam Ohms')
ylabel('Daya dalam watts')
plot(rl,pl,'+')
title('Grafik Hubungan Daya terhadap Beban dengan Diff')
xlabel('Hambatan Beban dalam Ohms')
ylabel('Daya dalam watts')
diary off

S-ar putea să vă placă și