Sei sulla pagina 1di 2

# De La Salle University - Dasmariñas

## College of Engineering, Architecture, and Technology

ENGINEERING DEPARTMENT

LABORATORY ACTIVITY

Activity No. 2

Vectors

Problem #1:

CODE: OUTPUT:

t=0:100; q=
x=pi.*t; Columns 1 through 15
0 2.8842 1.0812 -0.6558 -0.6436 -0.0000
y=-t./2;
0.2368 0.0887 -0.0538 -0.0528 -0.0000 0.0194
q=5.*(sin((x)./(2.5))).*exp(y) 0.0073 -0.0044 -0.0043

Columns 16 through 30
-0.0000 0.0016 0.0006 -0.0004 -0.0004 -
0.0000 0.0001 0.0000 -0.0000 -0.0000 -0.0000
0.0000 0.0000 -0.0000 -0.0000

Columns 31 through 45
-0.0000 0.0000 0.0000 -0.0000 -0.0000 -
0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000
0.0000 0.0000 -0.0000 -0.0000

Columns 46 through 60
-0.0000 0.0000 0.0000 -0.0000 -0.0000 -
0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000
0.0000 0.0000 -0.0000 -0.0000

Columns 61 through 75
-0.0000 0.0000 0.0000 -0.0000 -0.0000 -
0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000
0.0000 0.0000 -0.0000 -0.0000

Columns 76 through 90
-0.0000 0.0000 0.0000 -0.0000 -0.0000 -
0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000
0.0000 0.0000 -0.0000 -0.0000

## Columns 91 through 101

-0.0000 0.0000 0.0000 -0.0000 -0.0000
0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000
Problem #2:
CODE: OUTPUT:

theta=linspace(0,2*pi,7); x=
r=5; 5.0000 2.5000 -2.5000 -5.0000 -2.5000 2.5000
5.0000
x=r*cos(theta)
y=r*sin(theta)
r= sqrt(x.^2+y.^2) y=
0 4.3301 4.3301 0.0000 -4.3301 -4.3301
-0.0000

r=
5.0000 5.0000 5.0000 5.0000 5.0000 5.0000
5.0000