Engineering Exam with Matlab
Engineering 1181 Test 2 AU13 Name____ Practice __________________
1)10 pts. Convert the following base 10 numbers to binary:
148
39
2)10 pts. Convert the following binary numbers to base 10.
11 0101
1 1011
140 Ω
200 Ω
160 Ω
Circuit diagram for problems 3 & 4.
3) 15 pts. Assume the power supply delivers 6 V D.C. and the resistances are shown in the circuit.
a) What is the equivalent resistance of the circuit?
b) What is the current through the battery?
c) What is the voltage across the 200 Ω resistor? (Hint: Think what its current must be.)
4) 5 pts. Using Kirchoff’s laws, determine the current through the 160 Ω resistor.
5) 10 pts. Suppose you have a bank of 6 solar cell panels each with an area of 0.7 m by 1.4 m and an efficiency of 17%. How much power can the cells together generate on a day where the light intensity is 510 W/m2 ?
6) 8 pts. If the solar cell operates for 8 hrs. with this light intensity, how much electrical energy was generated? Give the answer in kwhr with 2 significant figures.
7) 6 pts. If the following statements were in a MATLAB script file, what would be the value of D? Show your work for credit.
A = 7
B = 8
C= 8
D= (B<=C)*3 + (A<B)*5 + (A*B > C^2)*A + (3^2<C)*(-2)
8) 6 pts. What MATLAB command(s) would you use to create an array that starts at 57 and ends in 15 with eight evenly spaced elements? (You do not need to use MATLAB for this. Just write the command below.)
9) 7 pts. Peter’s salary is $ 400 every week. Peter will get a $350 bonus added to his salary if his sales for the week are greater than $10,000. Write a MATLAB command using relational operators that would determine Peter’s salary. Use the variable name sales for his actual sales. (You have to assume the amount of his sales were given previously in the program. You do not need to use MATLAB for this. Just write the code.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Create one MATLAB program that will contain problems 10 and 11.
|
10) 20 pts. Go to MATLAB and create a script file that can find the solutions to the following three linear equations:
3X + 5Y + 2Z = 23.4
2X – 0.216Y + Z = -0.6
-6X + 2.51Y = -1.8
Show the values of X,Y, and Z with fprintf commands that use a text string to say the variable name and show the value of the variable. The format of the values of X, Y and Z should have three places to the left of the decimal point.
11) 8 pts. Use MATLAB to evaluate C below. The angle is in degrees. No fprintf or format commands for the value of C are needed. :
C =( 16.522 )cos(36) |
|
4.32 + 5.42
|
Print out the script file and the program results. Staple the output to this test.
Formulas V=IR Rseries = R1 + R2 + R3+ … 1/Rpara = (1/Rs) + (1/R2) + (1/R3) + …