I have EGR homework in a program called MATLAB anyone knows this program???

profileSaeed Altirad
hw_3_sp_17.docx

EGR 140 Scientific Programming

Assignment # 3 Spring 2017

Use MATLAB to solve each problem by writing script files; copy and paste the script file AND the results in the Command Window to a WORD document that has your name and section in the headers of each page and the page number in each footer. Edit the output to remove extra lines and empty spaces as shown in the solutions to the assignments 1 and 2. The script files SHOULD have comments for easy readability; take a print out of the file; staple before submission.

Due at the beginning of the class on Monday, February 20, 2017.

1. When several resistors are connected in an electrical circuit in parallel, the current through each of them is given by where and are the current through resistor n and its resistance, respectively, and is the source voltage. The equivalent resistance, Req, can be determined from the equation:

The source current is given by:and the power, , dissipated in each resistor is given by:

Write a program in a script file that calculates the current through each resistor and the power dissipated in each resistor in a circuit that has resistors connected in parallel. When the script file runs it asks the user first to enter the source voltage and then to enter the resistances in a vector. The program displays a table with the resistances listed in the first column, the current through the resistor in the second, and the power dissipated in each resistor in the third column. Following the table, the program displays the source current and the total power. Use the script file to solve the following circuit.

Problem 2:

A paper cup shaped as shown with = 1.25 is designed to have a volume of 250. Determine, and the surface area, S, of the paper for cups with heights h, of 5, 6, 7, 8, 9, and 10 cm. The volume of the cup, V, and the surface area of the paper are given by:

++)

)+)+𝛱

The program displays a table with the heights listed in the first column, R1 in the 2nd column, R2 in the 3rd column, and S in the 4th column. Units for each must be included in the table.

3. The temperature dependence of the heat capacity of many gases can be described in terms of a cubic equation:

+d

The following table gives the coefficients of the cubic equation for four gases. is in joules/(g mol)().

Gas

a

b

c

d

SO2

38.91

3.904x

-3.105x

8.606x

SO3

48.50

9.188x

-8.540x

32.40x

O2

29.10

1.158x

-0.6076x

1.311x

N2

29.00

0.2199x

-0.5723x

-2.871x

Calculate the heat capacity for each gas at temperatures ranging between 200 and 400˚C at 20˚C increments. To present the results, create an 11 matrix where the first column is the temperature, and the second through fifth columns are the heat capacities of, , , and , respectively.

4. Problem 22 from your text.

EGR 140 Homework 3 SP 2017 Page 2