Assignment 3
Assignment 3
PART - 1
a. polar2rect
b. rect2polar
for conversion of polar coordinates to rectangular coordinates and vice-versa. Keep in mind to check
if correct arguments have been provided or not.
2. Write a random number generator which will generate random numbers lying in the
range [0,1) using the following expression:
Generate 100000 random numbers and calculate their average and standard deviation. Now generate
100000 random numbers using rand command and evaluate their average and standard deviation.
What is the variation in the results?
Generate two histograms for both the results obtained above using hist command with 10 bins.
3. Plot the function y = e^(-x) * sin(x) for x between 0 and 3, using step size 0.01.Create the following
types of plots:
4. Create a mesh, surface and contour plot of the function z = e^{x + iy} for the interval -1 < x < 1 and
-2pi < y < 2pi. Use 10000 points of x and y in each case. Make three separate plots in each case:
real(z), imaginary(z) and abs(z).
PART - 2: Using the Symbolic Toolbox discussed in the lecture, complete the following tasks:
1.
Where the prime denotes the derivative with respect to t. Determine an expression for the curvature for a deltoid
whose parametric equations are given by
2.
The nondimensional response y(t) of a single-degree-of-freedom system whose mass is subjected to a suddenly
applied and maintained force of unit magnitude at t=0 is given by
Obtain a symbolic solution to this integral and then from that result determine the earliest time greater than zero
when y(t) is a maximum.
1. Create a set of M-Scripts that will carry out the following series of operations:
Relevant equations:
Equation of torus:
Create a polar plot of the normalized radiation pattern for: ka = 6*pi, theta ranging from pi/2 and pi/2
Magnify the result obtained using axis command (as discussed in the class) to obtain the following results:
Polar plot of the radiation pattern
Magnified region