Professional Documents
Culture Documents
Computer/3
Lect.10/ Solution of the Sheet/1
Third Year
Lecturer : M.Sc. 𝐖𝐚𝐟𝐞𝐞𝐪𝐚 𝐀𝐛𝐝𝐮𝐥𝐫𝐚𝐳𝐚𝐤 𝐇𝐚𝐬𝐚𝐧
Sheet /Computer /3-Theorticaly
1-1-True or False. If y has not been assigned a value, MATLAB will allow you to define the
equation x = y ^2 to store in memory for later use.
3- Generate a plot of the tangent function over 0 ≤ x ≤ 1 labeling the x and y axes. Set the
increment to 0.1.
4- Show the same plot, with sin(x) added to the graph as a second curve.
5- Plot the curve x =𝑒 − 𝑡 cos t, y = 𝑒 − 𝑡 sin t, z = t using the plot3 function. Don’t label the
axes, but turn on the grid.
10- The command in MATLAB to find the number of elements of the matrix (A)
Sheet /Computer /3-Practicaly
1 2 3 7 8 9
4- Suppose that 𝐴 = 4 5 6 . Use it to create 𝐵 = 7 8 9
7 8 9 4 5 6
5- Create a row vector of data points to represent -p ≤ x ≤p with an increment of 0.2.
Represent the same line using linspace with 100 points and with 50 points.
6- Find the result for this equation, Where x=10 and y=-30
x+2 72
z= +
2+32 √x
7- -Enter these matrixes in MATLAB and then find:
3 9
𝐴 = −2 7 ,
1 6
22 −4
𝐵 = 43 1
−9 7
1. A>B.
2. A<0 OR B>0.
3. Expand A into matrix with 3x3 and put the element in position (3,3) =10.
8- For the polynomial below find the following in MATLAB program:
𝒑(𝒙)= ( 𝑥 5 −𝟐 𝑥 4 +𝟑 𝑥 3 +𝟒 𝒙−𝟏𝟐 )
1/ Value of a Polynomial, when x = 2.
2/ Roots of a Polynomial
3/ Polynomial Coefficients
4/ Derivatives of Polynomials
9- For the polynomials below find the following in MATLAB program:
𝒑𝟏(𝒙)=( 𝑥 3 −𝟏𝟒 𝑥 2 +𝟐𝟔 𝒙−𝟐𝟒 )
𝒑𝟐(𝒙)=(𝟏𝟎 𝑥 2 +𝟑 𝒙−𝟐)
1/ Adding Polynomials.
2/ Subtracting Polynomials.
3/ Multiplying Polynomials.
4/ Dividing Polynomials.
Thank You