{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Unit 13 Test 02 - UNIT13/REVIEW3TEST 1. a b...

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

View Full Document Right Arrow Icon
UNIT 13/ REVIEW 3 TEST 1. Briefly answer each of the following questions. a. What is the main difference between MATLAB and C++? b. What is the function of '.'(dot) operator in MATLAB? c. What are the differences between script m-files and function m-files? a) MATLAB is an interpreted language, whereas C++ is compiled language. MATLAB will run your code  until it hits a line with error, but C++ will only run if you have an error free code. b)'.' forces the math function (like power, multiplication) to happen element by element. c) The biggest difference between scripts and functions is that functions have input and output  parameters. Script files can only operate on the variables that are hard-coded into their m-file. 2. Create a 5x5 matrix with random integers between 1 and 100. Output a  vector of the remainder of the ratio between the maximum and the minimum  element values in each row of the matrix. Then, create five, 5 by 1 vectors 
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.

{[ 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