Matlab Essx
Matlab Essx
Matlab Essx
1
Q.1
Let x = -6+8j
Find
i.
ii.
iii.
iv.
v.
Real component of x
Real component of x
Magnitude of x (use three different methods)
Phase angle of x (two different methods)
Phase angle in degrees using direct command
Q.2
If x= 1+1j
Convert Cartesian co-ordinates of the complex no. x into polar coordinates.
Q.3
Q. 4
Given two sides a=3.2 and b=4.6 of a triangle and angle =600 between these two sides, find the
length of the third side and area of triangle.
Q.5
s = 1
x 2 x 4 x 6 x8
+ +
2! 4! 6! 8!
for x = 1.5
Q.6
The values of a, b, c and d are -190.5*10-2, 14.6*103, 0.00056 and 456.28 respectively. Write a
program to evaluate the following statements
f1=
Q.7
a d
ab
+ a b and f 2 = bc a
cd
Given the radius of a circle r-5cm, find circumference and its area.
Q.8
Given the base of the right angle triangle =5cm and the acute angle, =420 Find the length of its
perpendicular
Q.9
For an electrical circuit with an inductance L=0.01mH and resistance R=100ohms, the damped
1
R2
2 . Write a program to calculate the frequency for
LC 4c
Evaluate the following trigonometric functions for = 300 ,1200 , 2100 and3000
sin ( ),
cos ( )
iii.
iv.
Q.11
i.
ii.
iii.
tan ( )
cot ( )
Evaluate the following trigonometric functions for = 3,5and 8 .
sinh ( ),
cosh ( ),
tanh ( ),
Sheet 2
1 10 20
Q.1
Let the matrix A = 2 5 6 . Reshape the matrix into column vector. Use a single
7 8 9
command
Q.2
1 2 3 4
9 10 11 12
Q.3
Let A =
6 7
8 9
i.
ii.
1
x=
2
y = [3 4]
6 7
6 7 1
and G =
6 7
. Delete the element with indices (1, 2) from matrix A.
8 9
Q. 5
Let A =
Q.6
A1
1 2
. Compute matrix B, where B =
3 4
A3
A2
, where A1=A,
A4
Q.9
Q.10
Q.11
Q. 12
Write the program to add two polynomials, a = (s2 + 2s + 1) and b = (s3 + s +5) and write the
answer.
Q. 13
Q. 14
i.
ii.
Q.15
1 3 2
2 8 6
Q. 16
Evaluate the value of matrix polynomial 2s2 + 3s + 4 where the square matrix s is
1 3 2
s = 5 1 8 using a single command.
6 4 3
Q. 17 Determine the partial fraction for F ( s ) =
2s 3 + 9s + 1
s 3 + s 2 + 4s + 4
Sheet No 3
Q.1
Determine the current flowing through each branch in the resistive circuit shown in figure below.
below
the circuit parameter are as follows
R1= 5 ohms, R2= 100 ohms, R3= 200 ohms, R4= 150 ohms, R5= 250 ohms, V1= 100 V, V2= 50 V.
Ans
Find the node voltages and current flowing through resistance R4 in the circuit shown
sh
below. The
Q.2
circuit parameters are as follows E1 = 100V, E2 = 50V, R1 = 1.5kohms, R2 = 1.2kohm
.2kohms, R3 = 2.2kohms,
R4= 1.4 kohms, I= 100mA.
Ans
V1=
= 94.7837V, V2=145.5471V, I=
I=-0.0338A
Q.3
Find the voltage acrosss the capacitor in the network shown below
Ans
VC=-0.135V
Q.4
A voltage of 100V, 50 Hz is applied across a 10 ohm resistance
resistance. Write the time equation for
voltage and resulting current. Draw the voltage and current waveform and show that the current in a
purely resistive circuit is in phase with voltage.
Q.5
Use subplot plot command to plot the current and voltage waveform for two cycles in purely
inductive and purely capacitive circuit with circuit parameter V=100 V, f=50 Hz, L=20mH and C=
1000F.Take time increment as 10-3.Plot the capacitor voltage and current on same axis and inductor
voltage and current on same axis with different colours. Properly label the graph. Use legends.
legends
Q.6
A voltage v = 100 sin wt is connected across a circuit having Z = 5 600 . Plot the voltage,
current, and power in the circuit. Predict the nature of the circuit.
Q.7
Calculate the resonant frequency in a series RLC circuit .the circuit. The circuit parameters are as
follows: R==100ohm, L = 85H, C =298F, V=10V.
a. Plot XL, XC, and R as a function of frequency and obtain resonant frequency graphically.
b. Plot impedance and current as a function of frequency and obtain resonant frequency graphically
c. Show graphically how power factor varies with frequency. Show that at resonant frequency
Power factor angle is = 0 .
Ans
Q.8
Use plot command, line command and hold on command to generate multiple plots of
y1 = e 0.1 x . * sin x
increment step = 0.01; 0 x 20
y 2 = sin x
increment step = 0.1; 0 x 20
y3 = cos x
increment step = 0.1; 0 x 20
Q.9
Plot the curve given by the equation a = 10e-t for t = 0 to 5. Show the grid line on the plot.
Q.10
a.
b.
c.
d.
Divide the figure window into four subwindows and plot the following functions
Plot v v/s I, where v = 4*I and I = 1, 2, 3, 4, on the upper left subwindow
Plot y v/s x, where y = x2 and x = 1, 2, 3, 4, on the upper right subwindow
For t = 0 : 2*pi in step t= pi/60, plot sin(t) v/s t, on the lower left subwindow
For t = 0 : pi/30 : 2*pi, plot cos(t) v/s t, on the lower right subwindow
Sheet No. 4
Q.1
Write a MATLAB program to obtain the sum of all integers from 0 to 20, using for loop
statement, when the increment value is only 1
Q.2
Write a program to illustrate the use of for loop statement for discrete arbitrary integer values of
the index, given as a vector.
Q.3
Write a program to find the average of any 10 numbers using for statement. Check the program
with the following values
3 5 24 5 6 4 10 23 45 2
Q.4
Write a program using while loop to find the squared of integers less than 5.
Q.5
Q.6
Write a program to evaluate y=2x + 1, otherwise y=2x. Use if-else statement. Check the program
with value of x as (i) 7and (ii)2
Q.7
The marks obtained by the student of a class in a particular subject are as follows
50 65 72 70 82 85 86 88 70 71 75 72 82 80 81 90 92 56 64 65 70 71 95. Usea suitable operator to
determine the following
a. The number of students who scored 75 and above
b. The number of students who scored between 65 and 85
c. The order of students who scored between 50 and 60
Q.8
y = 10 x + 10
0 x 9
10
x0
for 5 x 30
Choose a spacing of dx = 35/300 to obtain 300 points
Q.9
Write a script file to determine how many terms are required for the sum of the series 5k2-2k,
k=1,2,3.to exceed 10,000. What is the sum for this many terms?
Q.10 Wrote the script file using conditional statements to evaluate the following function
x2 + 1
for x 0
y = 3 x + 1
for 0 x 10
9 sin(5 x 50) + 31 for x 10