CS310 Homework 2
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AnnouncementsCheck here periodically.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OverviewThis assignment introduces you to linear systems as well as interpolating and approximating data. Learning Outcomes
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ProblemsYou can get started with this assignment by downloading this MATLAB script: For problems where you are asked to write equations, you may use $$eqn$$ to enter the equations into your m-file and publish them as part of your MATLAB solution (as you did in Team Lab 1), or you can put them in a comment in your m-file, or you can hand write the equations onto your printed solution (or on a separate sheet). Otherwise, complete ALL your work in MATLAB (in your homework2.m script and any functions you write). Points will be awarded (or deducted) based on the completeness, correctness, technique, and style (readability) of your solution to each part and your presentation via your published homework2.m script. You may suppress the output of commands that create result vectors that are then plotted; otherwise, show ALL work (MATLAB commands and output). When preparing your work for publishing to HTML (or PDF), be sure to choose good cell division locations (at start of each question part or for new plots) and add comments to explain your code and results. Add function comments to any functions you write explaining what the function does, what it takes as input, and what value(s) it returns. Add comments to answer questions and offer conclusions when asked. Problem 1: (4 points) Component AnalysisAn electrical engineer supervises the production of three types of electrical components. Three kinds of material -- metal, plastic, and rubber -- are required for production. The amounts needed to produce each component are:
Suppose that totals of 3.89, 0.095, and 0.282 kg of metal, plastic, and rubber, respectively, are used each day. We wish to find how many of each component have been produced per day.
Problem 2: (9 points) Heat PlateIn much the same way that we solved the bug on a bar problem in Team Lab 3, we can solve a linear system to determine the temperature at various locations across a heat plate. We have simplified the problem to allow students to focus on the general concepts used when modeling such a problem as a system of linear equations. Imagine that you wish to know the temperature at all points on a plate that is insulated except for two positions on the edge where heating elements of known temperature are applied. At some point when the temperature at all positions on the plate have stabilized, what will the temperature at each point be? To solve such a problem, we imagine the plate surface divided into equal sized "tiles" and restate the problem to find the temperature at the center of each tile. We know that the temperature of each tile depends upon its neighboring temperatures. In fact, it is a weighted average of those temperatures based on the proportion of our tile's edge that is shared with its neighbor. Here is a rectangular "plate" divided into 15 equal area tiles. Assume that each edge of each tile has identical length, so that the temperature of any one tile is a simple average of the temperatures of all neighboring tiles that share a side with the tile in question. This creates a system of 15 equations, one for each "tile" area. ![]() TA and TB are the non-insulated positions along the edge where a heat source of known temperature will be applied. The temperatures at T1 through T15 are the unknowns that you wish to find.
Problem 3: (12 points) InterpolationThe temperature for a midwest city was collected at one-hour intervals. Data was collected throughout a 24-hour period, starting at 8 AM, and is reported in the following table. Unfortunately, data for five different hours was lost.
Problem 4: (5 points) ApproximationFor the data in the following table, the y data obviously decays as x increases:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Handing in
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Last Updated: 2/14/2013 © 2012 Beck Hasti, hasti@cs.wisc.edu; some problems based on problems from Applied Numerical Methods with MATLAB for Engineers and Scientists (2nd ed), Steven C. Chapra, McGraw-Hill (2008) |