1 / 36

ENED 1090 Midterm Exam Review

ENED 1090 Midterm Exam Review. Outline. General Information Time, place, etc Exam Structure Topics Types of questions Review Questions. General Information. What: ENED 1090 Midterm Exam Day: Thursday, October 24 th , 2013 Time: 6:00-7:30pm OR 7:45-9:15pm

istas
Download Presentation

ENED 1090 Midterm Exam Review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENED 1090 Midterm Exam Review

  2. Outline • General Information • Time, place, etc • Exam Structure • Topics • Types of questions • Review Questions

  3. General Information • What: ENED 1090 Midterm Exam • Day: Thursday, October 24th, 2013 • Time:6:00-7:30pm OR 7:45-9:15pm • Where: Zimmer Auditorium

  4. General Information • Exam Structure • Exam is out of 100 points • 7 questions, some questions with multiple parts • Short answer and worked out problems • “Cheat Sheet” provided with fprintf, input, menu • Calculator allowed

  5. General Information • Topics: • Number conversions: binary, decimal, hexadecimal • Plotting: how to create plots in MATLAB, problems you might encounter and how to fix them • Mathematical operations • Interpolation and curve fitting • Input/output: input, menu, fprintf • Conditional Structures: Boolean/relational logic, if-elseif-else, switch

  6. General Information • You will NOT have to hand-write a program on the exam • You will need to be able to: • Determine the output of a code fragment • Translate a mathematical statement into MATLAB • Modify existing code • Answer conceptual questions about the different topics

  7. Review Questions

  8. Review Questions: Number Conversions • How do you convert a number from decimal to binary? • How do you convert a number from binary to decimal? • How do you convert a number from binary to hexadecimal? • How do you convert a number from hexadecimal to binary?

  9. Review Questions: Number Conversions • Convert the following numbers to binary: 227 2076

  10. Review Questions:Number Conversions • Convert the following binary numbers to decimal numbers:110110110010110001

  11. Review Questions:Number Conversions • Convert the following binary numbers to hexadecimal11010101110000100101101001101001

  12. Review Questions:Number Conversions • Convert the following hexadecimal numbers to binaryE6AD5CABB46E

  13. Review Questions:Number Conversions • Convert the following decimal number to hexadecimal8475 • Convert the following hexadecimal number to decimalB3A2CA75

  14. Review Questions:Plotting • List the steps and MATLAB commands required to plot the mathematical expression shown below with appropriate labels and titles:

  15. Review Questions:Plotting • What kinds of problems can you have when plotting? • How can you fix them?

  16. Review Questions:Mathematical Operations • How would you write the following equations in MATLAB? • If you assume T = 0:25:325, how does that change the expression for in MATLAB?

  17. Review Questions: Interpolation • What does interpolation mean? • What is the purpose of performing interpolation?

  18. Review Questions: Interpolation • What are the different methods of interpolation discussed in class? • What are the benefits/drawbacks of each?

  19. Review Questions: Interpolation • Assume you have the following two points: (3,4) (6,8) Use linear interpolation to find the value at: X = 4 X = 5.3

  20. Review Questions: Interpolation • Using nearest point and linear interpolation, find the value of the point at the following times: • t = 2.2s • t = 0.9s • t = 4.35s

  21. Review Questions: Interpolation • Using nearest point and linear interpolation, find the value of the point at the following times: • t = 1.1s • t = 2.8s • t = 3.85s

  22. Review Questions: Curve Fitting • What does curve fitting mean? • What is the purpose of performing curve fitting?

  23. Review Questions: Curve Fitting • How do you perform curve fitting in MATLAB? • What is the difference between curve fitting and interpolation?

  24. Review Questions:Conditional Structures • What are the three main Boolean logic operators and how do they operate?

  25. Review Questions:Conditional Structures • What are the six main relational logic operators and how do they operate?

  26. Review Questions:Conditional Structures • Assuming A = 3, B = 5, C = true, and D = false, what do the following expressions result in? • C && D • C || D • A && C • A > B • C < B || D • (A + C) < B && ~D || B < A

  27. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user inputs: C answer = input('Grade your prof (A,B,C,D,F): ','s'); ifanswer == 'A' ||answer == 'B' disp('You''reright!'); elseifanswer == 'C' disp('That could be better…'); elseif answer == 'D' || answer == 'F' disp('Uh oh, Spaghetti O''s'); else disp('Um…try again?'); end

  28. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user inputs: A answer = input('Grade your prof (A,B,C,D,F): ','s'); ifanswer == 'A' ||answer == 'B' disp('You''reright!'); elseifanswer == 'C' disp('That could be better…'); elseif answer == 'D' || answer == 'F' disp('Uh oh, Spaghetti O''s'); else disp('Um…try again?'); end

  29. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user inputs: F answer = input('Grade your prof (A,B,C,D,F): ','s'); ifanswer == 'A' ||answer == 'B' disp('You''reright!'); elseifanswer == 'C' disp('That could be better…'); elseif answer == 'D' || answer == 'F' disp('Uh oh, Spaghetti O''s'); else disp('Um…try again?'); end

  30. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user inputs: b answer = input('Grade your prof (A,B,C,D,F): ','s'); ifanswer == 'A' ||answer == 'B' disp('You''reright!'); elseifanswer == 'C' disp('That could be better…'); elseif answer == 'D' || answer == 'F' disp('Uh oh, Spaghetti O''s'); else disp('Um…try again?'); end

  31. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user presses: D answer = menu('What grade would you like?','A','B','C','D','F'); switch answer case 5 fprintf('That''snot good\n'); case 4 fprintf('You selected %d, also not good\n',answer); case 3 fprintf('That''sbetter\n'); case 2 fprintf('Now we''retalking, you chose %0.2f\n',answer); otherwise fprintf('Shoot for the stars!\n'); end

  32. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user presses: B answer = menu('What grade would you like?','A','B','C','D','F'); switch answer case 5 fprintf('That''s not good\n'); case 4 fprintf('You selected %d, also not good\n',answer); case 3 fprintf('That''s better\n'); case 2 fprintf('Now we''re talking, you chose %0.2f\n',answer); otherwise fprintf('Shoot for the stars!\n'); end

  33. Review Questions:Conditional Structures • What will the output be of the following code fragment if: user presses: A answer = menu('What grade would you like?','A','B','C','D','F'); switch answer case 5 fprintf('That''s not good\n'); case 4 fprintf('You selected %d, also not good\n',answer); case 3 fprintf('That''s better\n'); case 2 fprintf('Now we''re talking, you chose %0.2f\n',answer); otherwise fprintf('Shoot for the stars!\n'); end

  34. Review Questions:Problem Solving W x d1 d2 k1 k2 k3 The figure below shows a mass spring model used to design packaging systems and vehicle suspensions. The springs exert a force that is proportional to their compression, and the proportionality constant is the spring constant k. The two side springs provide additional support if the weight is too heavy for the center spring. A weight will cause a total displacement of x, based on the following formula: W = Σ(ki*xi), where ki is the spring constant for a given spring and xi is the amount a given spring is compressed. For a given weight, determine the total displacement.

  35. Review Questions:Problem Solving W x d1 d2 k1 k2 k3 Describe the inputs, outputs, and processing required to solve this problem Create a representation (flowchart, pseudocode, other) of a MATLAB solution for this situation Write a MATLAB script to solve this problem

  36. Good luck studying! Image taken from http://www.despair.com

More Related