1- Create a vector x with the elements:
a. 1,4,7,………………58
b. 10,8,…………………,-10
c. 1,1/3,1/5,……………,1/29
d. 1/4,3/7,5/10,…………,19/31
2- Compute S=1+4+7+……….+58
3- Compute P=1*2*3*………..10
4- Compute S1=1/2+3/4+5/6+………..to 10 element
5- Compute S2=1+1/3+1/5+……………1/29
6- Write matlab function to compute
a. The area of circle which have r=2
b. The area of circles which have the r=[2 3 4 6]
c. The area of square which have the side length=10
7- Write matlab commands to generate the matrices
( ) ( )
1 11 1 1 23 4
A= 2 4 6 8 , B= 2 4 6 8 ,
0000 3 6 9 12
8- Generate vector x (20) contains random numbers from -5 to 10.
a. Compute the sum off all elements in x
b. Compute the values y=x 2 +e x
9- Generate matrix A(4,4) contains random numbers from 1 to 3.
a. Compute sum of each row
b. Compute maximum number of A
10- Let x=[3;2;6;8] and y=[4;1;3;5]
a. Add the sum of the elements of x
b. Compute w=x 2 +2 y
c. Compute z=x ' y −w
11- Use matlab commands to create matrix A
( )
13 5 7
A= 1 11 1
24 68
0000
a. Assign the first row of A to vector called x
b. Assign the last two column of A to array called y
c. Change all elements of the third column to 9
d.
12- Use matlab command to create C and D
( ) ( )
5.23.1 4.9 25 8.5
C= 4.1 4.3 9 D= 3 4 .87
1.7 .76 2.8 23 7.4
a. Compute Y =C + D2
b. Compute the minimum value for each row in C
c. Compute the round and the floor of C
13- Use matlab command to create
( ) ( )
A= 4 2 B= 5 9 2 C=( 7 0 4 5 1 )
18 4 16 0
a. Compute the transpose of A
b. Compute the sum of main diagonal of A
c. Find the determinant and inverse of A
d. Compute the square root of each element in B
14- For x ∈ [ 3 ,5 ] compute y=sin ( x ) /cos ( x 2) then plot y
15- Plot the function x 2, x 3, and e x over the interval [0:4] at on figure
16- Plot the functionsin (x),cos (x ), and sin (x)cos (x) over the interval [0 :2 π ] at
on figure,
17- Compute x, y and z from
x + y + z=1
x− y +3 z=5
2 x+ 4 y− z=0
18- Compute
1
a. ∫ sin ( x ) dx
−1
5
b. ∫ x 2+ 5 e2 x dx
−5
c. ∫ sin ( y )+ y x 2 dy
2
x −4
d. lim
x →2 x−2
lim ¿
e. +¿
1
x→ 0 e x ¿
lim ¿
f. −¿
1
x→ 0 e x ¿
2
19- For z=5 y + ysin( x ) compute
2
∂ z
a. 2
∂x
2
∂ z
b.
∂ x∂ y
1 1
c. ∫ ∫ x2 +2 y dx dy
0 −1
( )
n
1
d. lim 1+
n→∞ n
20- Write the matlab commands that can be used to produce these figures?