{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

exam2_f07_formatted_solution

# exam2_f07_formatted_solution - ENGINEERING 126 Fall 2007...

This preview shows pages 1–4. Sign up to view the full content.

ENGINEERING 126 Fall 2007 Written Exam 2 Name: __________________________________ Student ID: _______________________________ Division/Section:___________________________ INSTRUCTIONS: Duration: 60 minutes Keep your eyes on your own work! Keep your work covered at all times! 1. Each student is responsible for following directions. Read carefully. 2. Excel and MATLAB commands, and Statistics equations are provided on the next page. 3. This exam consists of 7 pages (4 sheets front AND back). Check to be sure that you have all of the pages. 4. Write you name on the answer sheet . 5. Closed book and notes. 6. No calculators. 7. Please make sure you return the answer sheet .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
ENGR 126 – Fall 2007 EXAM II – Formula Sheet for Written Exam Statistics Equations = - - = n i i x x n s 1 2 2 ) ( 1 1 ( 29 1 1 2 1 2 2 - - = = = n n x x n s n i n i i i Linear Regression = = = + n i i n i i y bn x a 1 1 = = = = + n i i i n i i n i i y x x b x a 1 1 1 2 = - = n i i i x f y SSE 1 2 )] ( [ = - = n i i y y SST 1 2 ] [ SST SSE r - = 1 2 MATLAB Commands + - * / ^ = .* ./ .^ % ' (transpose) : ; < > <= >= ~ ~= = = & | [ ] ( null vector ) ( ) ... ( ellipse ) abs acos all asin atan ans any axis clc clear cos csc diary diff disp else elseif end exit exp factorial figure find format fprintf function grid help helpbrowser hist hold i, j if Inf input legend length linspace load log log10 loglog logspace lookfor max mean median min NaN ones pi plot polyfit polyval prod quit rand reshape round sec semilogx semilogy sin size sort sqrt std subplot sum tan text title who whos xlabel xor ylabel zeros Excel Functions + - * / ^ = \$ ABS AVERAGE COS EXP LN LOG10 MAX MEDIAN MIN MODE PI() SIN SQRT STDEV SUM TAN 2
ENGR 126 Exam 2 October 22, 2007 Problem #1 (8 points) The following MATLAB code was written in a script file: clear all n=8; if n>=10 disp('Range 3') elseif n>=5 disp('Range 2') elseif n>=0 disp('Range 1') end a . (4 points) When the MATLAB script is executed, Range 2 is displayed. Why doesn’t Range 1 also display? The first true statement in an if structure is executed and then execution continues after the end statement. b . (4 points) Since someone reading the program could find it confusing that Range 1 does not display, how should the program be modified to avoid confusion? Each elseif could be a left and right bounded compound statement. Problem #2 (12 points) I am forming teams and workgroups for an engineering project based on rules that match team members schedule and staffing needs. I have four independent conditions I want to test, so each can be analyzed without knowledge of the others. The first letter of the person’s name is used as the variable.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 9

exam2_f07_formatted_solution - ENGINEERING 126 Fall 2007...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online