Question: Two test cases and script is needed. This is a MatLAB question. Will give thumbs up for correct answers. Problem 2 In Engineering Foundations (ENED

Two test cases and script is needed. This is a MatLAB question. Will give thumbs up for correct answers.  Two test cases and script is needed. This is a MatLAB

Problem 2 In Engineering Foundations (ENED 1020), simple series and llel circ uits have been covered. For two resistors (R1l and R2) in series: . The total resistance is the sum of R1 and R2: Rtotal R1 + R2 .The current through each resistor is the Applied Voltage divided by total resistance: IR1 IR2-I Applied Voltage/Rtotal The voltage across each resistor is current times resistance: VRI = RI *l and VR2=R2*1 For two resistors (R1 and R2) in parallel: The total resistance is: Rtotal Ri R2/(R1 + R2) The voltage across each resistor is the Applied Voltage: VR1-VR2-Applied Voltage The current through each resistor is the Applied Voltage divided by the resistance: IRI-Applied Voltage/R1 and IR2 Applied Voltage/R2 Write a script that will do the following: Ask the user with a menu statement whether the circuit is series or parallel Prompt the user to enter the two resistor values Prompt the user to enter the Applied Voltage Use a switch structure based on the menu choice (series or parallel), and calculate the total resistance, the current through each resistor, and the voltage across each resistor Use fprintf statements to display the results. Include units for all outputs! 910 Ohms, R2 = 470 Test Case # 1: Series Circuit. R1 Ohms, Applied Voltage = 12 V Paste the resulting output here: 470 Test Case #2: Parallel Circuit, R1-910 Ohms, R2 Ohms, Applied Voltage = 12 V Paste the resulting output here: Paste your script file commands here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!