This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 'XNH 8QLYHUVLW\ (GPXQG 7 3UDWW -U6FKRRO RI (QJLQHHULQJ EGR 53L Fall 2009 Test I Rebecca A. Simmons & Michael R. Gustafson II Name and NET ID (please print) In keeping with the Community Standard, I have neither provided nor received any assistance on this test. I understand if it is later determined that I gave or received assistance, I will be brought before the Undergraduate Conduct Board and, if found responsible for academic dishonesty or academic contempt, fail the class. I also understand that I am not allowed to speak to anyone except the instructor about any aspect of this test until the instructor announces it is allowed. I understand if it is later determined that I did speak to another person about the test before the instructor said it was allowed, I will be brought before the Undergraduate Conduct Board and, if found responsible for academic dishonesty or academic contempt, fail the class. Signature: Notes • You will be turning in each problem in a separate pile. Make sure, then, that you do not put work for more than any one problem on any one piece pf paper. For this test, you will be turning in five different sets of work. • Be sure your name and NET ID show up on every page of the test. If you are including work on extra sheets of paper, put your name and NET ID on each and be sure to staple them to the appropriate problem. • This first page should have your name, NET ID, and signature on it. It should be stapled on top of your submission for Problem I. Name (please print): Community Standard (print ACPUB ID): Problem I: [15 pts.] Basic Programming • Write all the MATLAB statements required to generate a graph that shows three functions for height (in meters): y 1 ( t ) = e t y 2 ( t ) = t 2 y 3 ( t ) = ln( t ) for t between 1 and 2 seconds. Your graph should include 120 linearly spaced points between 1 and 2 for t . You should include axis labels, a title, and a reasonable legend placed as far out of the way as MATLAB can handle. You should make sure to use black lines but may choose the style. You should save the graph in a file called ThreeLines.eps . The script is started for you clear; format short e; figure (1); clf t = linspace(1, 2, 120); plot(t, exp(t), ’k-’, t, t.^2, ’k--’, t, log(t), ’k:’) legend(’e^t’, ’t^2’, ’ln(t)’, 0) xlabel(’Time (s)’) ylabel(’Height (m)’) title(’Height vs. Time for Three Functions (NET ID)’) print -deps ThreeLines.eps • Write a function .m file called GeoMean.m to calculate the geometric mean of two numbers: Geometric Mean of a and b = √ a · b Your function should check to make sure the user called the functions with two inputs and give an error otherwise. Similarly, your program should make sure the two inputs are the same size and give an error if not....
View Full Document
This note was uploaded on 02/13/2010 for the course EGR 012 taught by Professor Witfield during the Spring '10 term at Aarhus Universitet.
- Spring '10