05/12/16 0:59 MATLAB Command Window 1 of 1: %nama: Rexzy Senolinggi %NIM: 32215010 %kelas: 2 A Telkom

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

05/12/16 0:59 MATLAB Command Window 1 of 1

>> %Nama : Rexzy Senolinggi


>> %NIM : 32215010
>> %Kelas : 2 A Telkom
>>
>> %Tugas 1
>> %Contoh Soal 1
>> % s^3+4s^2+8s-12=0
>> p = [1 4 8 -12]

p =

1 4 8 -12

>> roots(p)

ans =

-2.4732 + 2.5621i
-2.4732 - 2.5621i
0.9463 + 0.0000i

>> %Contoh Soal 2


>> % s^3-4s^2+8s-12=0
>> p = [1 -4 8 -12]

p =

1 -4 8 -12

>> roots(p)

ans =

2.6850 + 0.0000i
0.6575 + 2.0092i
0.6575 - 2.0092i

>> %Contoh Soal 3


>> % s^4-s^3+2s^2+3=0
>> p = [1 1 2 2 3]

p =

1 1 2 2 3

>> roots(p)

ans =

0.4057 + 1.2928i
0.4057 - 1.2928i
-0.9057 + 0.9020i
-0.9057 - 0.9020i

>>

You might also like