CVE 325 Final
-
Upload
mueller-rifai -
Category
Documents
-
view
30 -
download
1
description
Transcript of CVE 325 Final
![Page 1: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/1.jpg)
CVE 325 L- Final Examinations
Section: Thursday
Problem One:
>> AQ=[12 13 14 15 16 17 18]
1 | P a g e
![Page 2: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/2.jpg)
AQ =
12 13 14 15 16 17 18
>> Fall2013= diag(AQ)
Fall2013 =
12 0 0 0 0 0 0
0 13 0 0 0 0 0
0 0 14 0 0 0 0
0 0 0 15 0 0 0
0 0 0 0 16 0 0
0 0 0 0 0 17 0
0 0 0 0 0 0 18
>>
Problem Two:
>> A=[36 1 4;1 64 16;4 9 81]
A =
36 1 4
2 | P a g e
![Page 3: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/3.jpg)
1 64 16
4 9 81
>> D=det(A)
D =
180435
>> T=transpose(A)
T =
36 1 4
1 64 9
4 16 81
Problem Three:
>> A=[6 1 4;1 8 16;4 9 9]
A =
6 1 4
1 8 16
4 9 9
3 | P a g e
![Page 4: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/4.jpg)
>> B=[36 1 4;1 64 16;4 9 81]
B =
36 1 4
1 64 16
4 9 81
>> C=[64 1 4;1 81 16;4 9 100]
C =
64 1 4
1 81 16
4 9 100
>> A(2,3)
ans =
16
>> P=A(2,3)*B(2,2)*C(3,3)
4 | P a g e
![Page 5: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/5.jpg)
P =
102400
Problem Four:
>> x=[-2.5:0.5:3]
x =
Columns 1 through 8
-2.5000 -2.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000
Columns 9 through 12
1.5000 2.0000 2.5000 3.0000
>> >> plot (x,y)
5 | P a g e
![Page 6: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/6.jpg)
Problem Five:
>> H=[5 2 1 | 3;4 1 -1 | -3;-2 3 -3 | 5]
H =
5 2 1
4 1 1
-2 3 1
6 | P a g e
![Page 7: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/7.jpg)
>> H1=inv(H)
H1 =
0.2500 -0.1250 -0.1250
0.7500 -0.8750 0.1250
-1.7500 2.3750 0.3750
>>
Problem Six:
>> X
X =
Columns 1 through 8
2.0000 2.1000 2.3000 2.4000 3.0000 2.9000 2.7000 2.6000
Columns 9 through 13
2.5000 2.3000 2.2000 2.1000 2.0000
>> Y
Y =
7 | P a g e
![Page 8: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/8.jpg)
Columns 1 through 8
2.1000 2.3000 2.6000 2.8000 5.1000 4.8000 4.2000 3.9000
Columns 9 through 13
3.8000 2.9000 2.6000 2.4000 2.1000
>> T=trapz(X,Y)
T =
-0.2550
8 | P a g e
![Page 9: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/9.jpg)
>>
Problem Seven:
>> X=[0:8]
X =
0 1 2 3 4 5 6 7 8
Y=X.*exp(X.*0.8)+0.2
Y =
9 | P a g e
![Page 10: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/10.jpg)
1.0e+03 *
Columns 1 through 8
0.0002 0.0024 0.0101 0.0333 0.0983 0.2732 0.7293 1.8932
Column 9
4.8150
>>
>> H=quadl('X.*exp(X.*0.8)+0.2',0,8)
H =
5.0812e+03
>> plot(X,Y)
Problem Eight:
>> x=[-5 -4 -2.2 -1 0 1 2.2 4 5 6 7];
>> y=[0.1 0.2 0.8 2.6 3.9 5.4 3.6 2.2 3.3 6.7 8.9]
y =
10 | P a g e
![Page 11: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/11.jpg)
Columns 1 through 8
0.1000 0.2000 0.8000 2.6000 3.9000 5.4000 3.6000 2.2000
Columns 9 through 11
3.3000 6.7000 8.9000
>> F=polyval(x,y,10)
F =
1.0e+10 *
Columns 1 through 8
0.0000 0.0000 0.0000 -0.0000 -0.0005 -0.0123 -0.0002 -0.0000
Columns 9 through 11
-0.0001 -0.1030 -1.7083
>> f=polyfit(x,y,10)
f =
11 | P a g e
![Page 12: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/12.jpg)
Columns 1 through 8
-0.0000 0.0002 0.0002 -0.0076 0.0090 0.1189 -0.1747 -0.6921
Columns 9 through 11
0.2655 1.9807 3.9000
>>
Problem Nine:
12 | P a g e
![Page 13: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/13.jpg)
>> YEAR=[1940 1950 1960 1970 1980 1990 2000];
>> POPULATION=[537 557 682 826 981 1135 1262];
>> plot(POPULATION,YEAR)
>>
>>ans =
572.2
Problem Ten:
>> h=500;
h1=75;
r=150;
r1=50;
>> VC=(1/3)*(pi)*(r^.2)*(h);
13 | P a g e
![Page 14: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/14.jpg)
VC1=(pi)*(r1.^2)*(h1);
>> VT=VC-VC1
VOLAQEEL =
-5.8762e+05
>>
Problem Eleven:
>> a=[1 -2 3 4];
>> b=[1 2 9 -16];
>> ab=conv(a,b)
ab =
1 0 8 -24 67 -12 -64
>> B=polyval(a,10)
B =
834
>>
Problem Twelve:
14 | P a g e
![Page 15: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/15.jpg)
>> UAE=rand(8,7)
UAE =
0.9631 0.3674 0.3354 0.7150 0.5000 0.1829 0.5005
0.5468 0.9880 0.6797 0.9037 0.4799 0.2399 0.4711
0.5211 0.0377 0.1366 0.8909 0.9047 0.8865 0.0596
0.2316 0.8852 0.7212 0.3342 0.6099 0.0287 0.6820
0.4889 0.9133 0.1068 0.6987 0.6177 0.4899 0.0424
0.6241 0.7962 0.6538 0.1978 0.8594 0.1679 0.0714
0.6791 0.0987 0.4942 0.0305 0.8055 0.9787 0.5216
0.3955 0.2619 0.7791 0.7441 0.5767 0.7127 0.0967
Problem Thirteen:
aqeelprod=factorial(5)
aqeelprod =
120
>> x=2
x =
2
15 | P a g e
![Page 16: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/16.jpg)
>> S=1-(x.^2/(1+2))+(x.^4/(1+2+3+4))-(x.^6/(1+2+3+4+5+6))+(x.^8/(1+2+3+4+5+6+7+8))
S =
5.3302
Problem Fourteen:
>> T=[0:(6*pi)]
T =
Columns 1 through 14
0 1 2 3 4 5 6 7 8 9 10 11 12 13
Columns 15 through 19
14 15 16 17 18
>> P1=(5*cos(2*T))-(2*T);
>> P2=(T)+sin(T)+1;
>> P3=(2)*(cos(3*T))-(1);
>> plot(T,P1,P2,P3)
>>
16 | P a g e
![Page 17: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/17.jpg)
Problem Fifteen:
>> [X,Y] = meshgrid(-1:3, 1:4);
>> Z = X .* Y.^2;
>> surf(X,Y,Z)
>>
17 | P a g e
![Page 18: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/18.jpg)
Problem Sixteen:
%Thickness of BoxL=25;W=30;H=5;side1=L*H;side3=L*H;side2=W*H;side4=W*H;Y=0.151X=20/(bottom+side1+side2+side3+side4)*Y Y =
0.1510
X =
18 | P a g e
![Page 19: CVE 325 Final](https://reader034.fdocuments.us/reader034/viewer/2022042514/55cf8fdf550346703ba0c30e/html5/thumbnails/19.jpg)
0.0023
19 | P a g e