This is not the document you are looking for? Use the search form below to find more!

Report home > Art & Culture


0.00 (0 votes)
Document Description
this is the lab for purdue ece151 matlab
File Details
  • Added: March, 03rd 2013
  • Reads: 259
  • Downloads: 3
  • File size: 104.64kb
  • Pages: 2
  • Tags: lab6, ece, purdue, lab
  • content preview
  • Name: Daniel
Embed Code:

Add New Comment

Related Documents


by: asdf, 7 pages


Content Preview
Purdue University Calumet
Enginerning Department
ENGR 151
Software tools for engineers
Due date: Monday March 4, 2013
* Purpose: To visualize an equation and use a combination of FOR loop and IF-END
statement to find the solution to a simple engineering problem.
* Step 1: Create a new script file LASTNAME LAB6.m. Answer the following ques-
tions by writing in the script file
- Clear screen
- Clear workspace
- Display your name
- Display the text "Part 1"
- Generate 1000 random numbers from 4 to 7 and count up the number of elements
that are > 5 and < 6 and display the result using SPRINTF.
- Display the text "Part 2"
- Using what you have learned in the last several labs it is desired to first make a
plot of the following equation:
P = RL
RL + 20
The equation is derived from the circuit shown below:

Purdue University Calumet
Enginerning Department
The Y axis variable P is power of the resistor RL which is transferred from a
battery modeled as a voltage source VT h equal to 10 V also having and internal
heating loss modeled by RT h = 20 Ohms .
It is desired to plot the power P on the Y axis in terms of the load resistance
RL on the X axis for the purpose of estimating the value of RL which results in
a maximum value of P . Assume the input RL, changes from 0 to 40 Ohms with
a step size of 0.1 Ohms. Create the plot described above and add a title, the
appropriate x and y labels and lastly activate a grid to aid in reading the plot.
- Display the text "Part 3"
- Use a FOR loop starting at RL = 0 having an ohmic step size of 0.001 ohms to
find the value of RL which makes power P maximum. You will need to include
an appropriate IF statement in your code to determine when the maximum value
of P is reached and stop the FOR loop using the BREAK command. Lastly, use
a combination of the SPRINTF and DISP commands to print out the solution
found for the value of RL and the corresponding value of load power P.
Hint: You can use the plot to determine an approximate answer for comparison
* Step 2: Upload the file LASTNAME LAB6.m to blackboard.




Your download will begin in a moment.
If it doesn't, click here to try again.

Share Lab6 to:

Insert your wordpress URL:


Share Lab6 as:



Share Lab6.

Enter two words as shown below. If you cannot read the words, click the refresh icon.


Share Lab6 as:

Copy html code above and paste to your web page.