Computational Physics Past Papers 

[OBJECTIVE]

Subject: Computational Physics-II

Time Allowed: 30 Min

Total Marks: 10

NOTE: ATTEMPT THIS PAPER ON THIS QUESTION SHEET ONLY. Division of marks is given in front of each question. This Paper will be collected back after expiry of time limit mentioned above.

 

Part-I Encircle the correct option, each question carries equal marks. (10)

1. Which of the following is used to print text on the graph:
(a) print text
(b) disp (‘text’)
(c) gtext(`text’)
(d) ginput(‘text’)
2. To find out polynomial from the roots:
a) find()
(b) roots()
(c) root()
(d) poly()
3. To remove linear trend of a signal we use:
(a) deletetrend
(b) removetrend
(c) detrend
(d) notrend
4. Which of the following is not used to print out value of g such that g =125;
(a) »g
(b) »display(g)
(c) >>disp(g)
(d) >>g;
5. If x =[7 2 2 9 8] for [vI,v2] = max(x); the value of (v1,v2) is:
(a) (9,4 )
(b) (4,9)
(c) (9,3)
(d) (3,9)
6. If a & b are vectors, which of the following is used for element by element operations.
(a) a .^ b
(b) a .* b
(c) a ./ b
(d) all of them
7. If x =17 0 2 0 8 1 then for output 149 0 4 0 64 ] which one is not true:
(a) x*x
(b) x.^2
(c) power(x,2)
(d) x.*x
8. If x =[3 0 0 1 6 I then for z = all(x) what is true :
(a) 1
(b) 0
(c) [1 0 0 1 1]
(d) [0 1 1 0 0]
9. The following command cannot change limits of the graph axis:
(a) axes( )
(b) axis( )
(c) xlim( )
(d) ylim( )
10. Which of the following is equal to output of z = factorial(5):
(a) prod(1:5)
(b) sum(1:5)
(c) 121
(d) all

[SUBJECTIVE]
Subject: Computational Physics-II
Time Allowed: 2 Hour 30 Min
Total Marks: 50
NOTE: ATTEMPT THIS (SUBJECTIVE) ON THE SEPARATE ANSWER SHEET PROVIDED

Part-II Give short answers, each question carries equal marks. (20)

Q#1: Give simple example to find zero index of values in an array?

Q#2: Write syntax with example for the following in:

(a) ginput() (b) dsolve() (c) gtext() (d) input()

Q#3: Write MATLAB program code segment for the following:

(a) to generate and plot 20 x 20 matrix of numbers

(b) to give one example to find out cumulative sum of [2 5 8 7)

(c) to find integral of a polynomial: 5×2 —2x + 20

(d) to calculate the roots of a polynomial (e) to multiply two polynomial and determine derivative

 

Part-III Give detailed answers, each question carries equal marks. (30)

Q#1: Suppose A be a 3×3 matrix, Write MATLAB program which reads in random numbers as entries of the matrix A and calculate (i) sum and average of the all matrix elements. (ii) transpose of the matrix A (also plot the matrix), (iii) also check whether the Matrix A is an identity matrix? (iv) Also sort the matrix elements, (v) divide matrix rows by its row average.

Write MATLAB program for a half wave rectifier circuit.

Q#2: Write MATLAB program for the forced harmonic motion (FHM) of a mass attached with a spring using Euler’s method under the following conditions. (g=9.8 m/s 1, initial position zero and velocity 15 m/s, time step 0.1 sec. and maximum time 15 sec., k = I N/m, m=1 kg, damping coefficient = 0.5 N/ms, =0.01 sd and f0=1.5N.). Calculate and print with proper labels the values of time against position, velocity and acceleration. How you can change the same program for the Simple H.M., Damped. H.M. The necessary equations are as follows: A = (-k x — b v + fo cos (wt) )/ m, x = x + v h, v = v + a h, t = t + h, Also draw estimate output graphs with proper curve labels, x & y labels and title. How randomly generated points can be used to show Brownian motion? Write MATLAB program to simulate Brownian motion of a particle for 31 collisions. Also calculate the distance traced by the particle. Note: Plot estimate graph if any.

Q#3: Write MATLAB program to calculate and print out factorial of a number taken from the user by using two methods. Implement your program using functions.

500+ Past Papers – Computer Science