Vous êtes sur la page 1sur 1

Assignment

Total marks: 5 Q#1 A simple electric circuit consists of a resistor, a capacitor and an inductor. The charge on a capacitor q(t0 as a function of time can be computed using

q(t ) = qo e R t /(2 L) cos[ 1 / L C ( R / 2 L )2t ]


Where t=time, qo is initial charge R is resistance L is inductance and C is capacitance use MATLAB to generate the plot of this function from t=0:5 given that qo=10 R=50 and C=10^-4 In MATLAB use sqrt( ) to calculate Q#2 Plot the functions in interval 0 x 2 using 100 points .use the Subplot command to display these functions on four windows on same graph.

y = sin x z = cos x

w = sin x cos x v = sin x / cos x


Hint: Use the linspace(a, b, number of points need to be generated) command to generate the 100 points in 0 x 2 Q#3 Create a Function file with a name freefallval to compute the velocity of freefalling object given the mass of object(m) 68.1 kg, second order drag co-efficient(cd) 0.25kg/m and time(t)=12seconds V = gm / cd tanh( g cd / m ) t

Vous aimerez peut-être aussi