Escolar Documentos
Profissional Documentos
Cultura Documentos
Programme
Registeration # DDP-FA10-BTE-008
DDP-FA10-BTE-030
DDP-FA10-BTE-053
Q2. Consider two polynomials p ( s)= s2+2s+a and q (s)=s+1. Using MATLAB, find
p(s)*q(s)
Roots of p(s) and q(s)
-1) and q(6)
Write code and record output.
Q4. Use MATLAB to generate the first 100 terms in the sequence a(n) define recursively
by a(n+1)= P*a(n)* (1-a (n ))
with p=2.9 and a(1) = 0.5.
Q5. Use for or while loop to convert degrees Fahrenheit to degrees Celsius using the
following equation
Tf =9/5 Tc+32
Use any starting temperature, increment and ending temperature (example: starting
temperature=0, increment=10, ending temperature = 200).
Q1(ans.):-
magic(5)
Results:-
ans =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
Q2(ans.):-
Results:-
enter the value of a=1
r1 =
0 2 1
r2 =
-1
-1
r3 =
-1
r4 =
r5 =
Q3(ans.):-
b=[2 5 3 6]
a=[1 6 11 6]
[r,p,k] = residue(b,a)
Results:-
b =
2 5 3 6
a =
1 6 11 6
r =
-6.0000
-4.0000
3.0000
p =
-3.0000
-2.0000
-1.0000
k =
(ii).
b=[1 2 3]
a=[1 3 3 1]
[r,p,k] = residue(b,a)
Results:-
b=
1 2 3
a=
1 3 3 1
r=
1.0000
0.0000
2.0000
p=
-1.0000
-1.0000
-1.0000
k=
[]
Q4(ans.):-
p=2.9;
a(1)=0.5;
for n=1:100
a(n+1)=p.*a(n).*(1-a(n))
end
Results:-
0.5000 0.7250 0.5782 0.7073 0.6004 0.6958 0.6139
0.6874. . . . . . . . . . 0.6552 0.6552 0.6552 0.6552 0.6552
Q5(ans.):-
for Tc = 0:10:200
Tf=9/5.*Tc+32
end
Results:-
Tf =
32
Tf =
50
Tf =
68
.
.
.
.
.
Tf =
356
Tf =
374
Tf =
392