You are on page 1of 2

Solve the ff using Matlab. Document the command used and the answer.

Save the file in pdf and email it to me on or


before 6 pm. No consulting with each other. Don’t stress, I will hold true to my promise pre-ECQ.

1. For the following 3 functions


i. 𝑓(𝑥) = 3𝑥 6 − 4𝑥 4 + 2𝑥 + 5
5 2
ii. 𝑓(𝑥) = 3 2
− 7𝑒 𝑥
√10𝑥
2𝑥
iii. 𝑓(𝑥) = 10𝑒 𝑠𝑖𝑛2𝑥
Find the following
a. Roots
b. Derivative and derivative evaluated at x=-1
c. Local and global minima and maxima
d. Integral and integral evaluated from x=-1 to 1

2. A simple diode circuit is shown below

= 10 V

= 100 ohms

A simple KVL equation yields


VT = VD + VL
or
10 =VD +100 ID

After substituting the diode equation


𝑉𝐷
𝐼𝐷 = 1 𝑥 10−12 (𝑒 0.026 − 1)

Using MatLab solve for the function VD. Using a MatLab function evaluate the function and solve for the numeric
value of VD.

3. Given the following circuit

Using Kirchhoffs Current Law, KCL the equations are given as:
At node A : I1 + I2 = I3
At node B : I3 = I1 + I2
Using Kirchhoffs Voltage Law, KVL the equations are given as:
Loop 1 is given as : 10 = R1 I1 + R3 I3 = 10I1 + 40I3
Loop 2 is given as : 20 = R2 I2 + R3 I3 = 20I2 + 40I3
Loop 3 is given as : 10 – 20 = 10I1 – 20I2

Choose 1 KCL and 2 KVL equations and solve the simultaneous equations
a. Using Matlab matrix algebra
b. Using Matlab’s solve function

4. The same technique can be applied in AC analysis that uses complex algebra. Redo number 3 but substituting
these:
Substitute this with this
R1 Z1 = 1 +j1
R2 Z2 = 2 –j3
R3 Z3 = 3 +j1
V1 V1 = 10
V2 V2 =5 angle 45°

5. Solve the following simultaneous equations using MatLab’s dsolve function, assume all initial conditions
zero.
𝑑𝑖1 𝑑𝑖2
5 −2 = 10
𝑑𝑡 𝑑𝑡
𝑑𝑖1 𝑑𝑖2
10 +3 = 12
𝑑𝑡 𝑑𝑡

You might also like