e6sampleMTproblems - Engineering 6 Sample Midterm Problems...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Engineering 6 Sample Midterm Problems University of California, Davis (Solutions provided at the end) NOTE: Some of the equations displayed below may not be printed correctly by all printers. This page may also not be displayed correctly by some old versions of Netscape Navigator and Internet Explorer. These sample problems are just that—sample problems. They do not necessarily cover all the topics that might appear on the exam. (See Midterm Study Guide for topics that are covered.) When you are asked to solve a problem and write a script, you are to first develop a mathematical algorithm, then write a Matlab script to compute and display the specified values. You must first show your work in developing the algorithm, either mathematically or in script comments. All computation is to be done in the script, not in your head or by calculator. Matlab variable names should correspond to the chosen mathematical variables. Comments must be included in the script to define variables and to explain sections of the code. The output displayed by the script should clearly identify the variable whose value is displayed and specify its units. 1. (20 points) (a) Explain the meaning of the following Matlab commands, identifying special variables and describing what actions Matlab would take in processing the commands: (i) s = sign(x) (ii) y = imag(z) (iii) clear (iv) save session2 (v) length_a = input('Length of side A: ') (b) Evaluate the following Matlab expressions, giving the format short display of the
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '09
  • Lagerstrom
  • Complex number, Netscape, MATLAB variable names, following MATLAB commands, following MATLAB expressions

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern