0% found this document useful (0 votes)
97 views19 pages

CVE 325 L-Final Examinations Section: Thursday

This document contains 16 math and programming problems related to matrices, vectors, plotting functions, integrals, derivatives, and geometry. It provides the code to set up and solve each individual problem, with the answers displayed at the end of each section. The problems cover a wide range of calculus, linear algebra, and MATLAB concepts.

Uploaded by

Müller Rifai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views19 pages

CVE 325 L-Final Examinations Section: Thursday

This document contains 16 math and programming problems related to matrices, vectors, plotting functions, integrals, derivatives, and geometry. It provides the code to set up and solve each individual problem, with the answers displayed at the end of each section. The problems cover a wide range of calculus, linear algebra, and MATLAB concepts.

Uploaded by

Müller Rifai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

CVE 325 L- Final Examinations

Section: Thursday

Problem One:
>> AQ=[12 13 14 15 16 17 18]

1 | Page

AQ =

12

13

14

15

16

17

18

>> Fall2013= diag(AQ)

Fall2013 =

12

13

14

15

16

17

18

>>
Problem Two:

>> A=[36 1 4;1 64 16;4 9 81]

A=

36

64

4
16
81

2 | Page

>> D=det(A)

D=

180435

>> T=transpose(A)

T=

36

64

16

81

Problem Three:
>> A=[6 1 4;1 8 16;4 9 9]

A=

16

>> B=[36 1 4;1 64 16;4 9 81]

3 | Page

B=

36

64

4
16
81

>> C=[64 1 4;1 81 16;4 9 100]

C=

64
1
4

1
81

4
16

9 100

>> A(2,3)

ans =

16

>> P=A(2,3)*B(2,2)*C(3,3)

P=

102400

4 | Page

Problem Four:
>> x=[-2.5:0.5:3]

x=

Columns 1 through 8

-2.5000 -2.0000 -1.5000 -1.0000 -0.5000

0.5000

1.0000

Columns 9 through 12

1.5000

2.0000

2.5000

3.0000

>> >> plot (x,y)

5 | Page

Problem Five:
>> H=[5 2 1 | 3;4 1 -1 | -3;-2 3 -3 | 5]

H=

-2

>> H1=inv(H)
6 | Page

H1 =

0.2500 -0.1250 -0.1250


0.7500 -0.8750
-1.7500

2.3750

0.1250
0.3750

>>
Problem Six:
>> X

X=

Columns 1 through 8

2.0000

2.1000

2.3000

2.4000

3.0000

2.1000

2.0000

2.9000

2.7000

2.6000

Columns 9 through 13

2.5000

2.3000

2.2000

>> Y

Y=

Columns 1 through 8

7 | Page

2.1000

2.3000

2.6000

2.8000

5.1000

2.4000

2.1000

4.8000

4.2000

3.9000

Columns 9 through 13

3.8000

2.9000

2.6000

>> T=trapz(X,Y)

T=

-0.2550

8 | Page

>>

Problem Seven:

>> X=[0:8]

X=

Y=X.*exp(X.*0.8)+0.2

9 | Page

Y=

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

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

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:
>> YEAR=[1940 1950 1960 1970 1980 1990 2000];
12 | P a g e

>> POPULATION=[537 557 682 826 981 1135 1262];


>> plot(POPULATION,YEAR)
>>

>>ans =
572.2
Problem Ten:
>> h=500;
h1=75;
r=150;
r1=50;
13 | P a g e

>> VC=(1/3)*(pi)*(r^.2)*(h);
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 =

8 -24

67 -12 -64

>> B=polyval(a,10)

B=

834

>>
Problem Twelve:

14 | P a g e

>> 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=

>> 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))
15 | P a g e

S=

5.3302
Problem Fourteen:
>> T=[0:(6*pi)]

T=

Columns 1 through 14

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

Problem Fifteen:
>> [X,Y] = meshgrid(-1:3, 1:4);
>> Z = X .* Y.^2;
>> surf(X,Y,Z)
>>

17 | P a g e

Problem Sixteen:
%Thickness of Box
L=25;
W=30;
H=5;
side1=L*H;
side3=L*H;
side2=W*H;
side4=W*H;
Y=0.151
X=20/(bottom+side1+side2+side3+side4)*Y

Y=

0.1510

X=
18 | P a g e

0.0023

19 | P a g e

You might also like