{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ENGR 132 - QUIZ3

ENGR 132 - QUIZ3 - ENGR 132 Thurs/Tues 9:30-11:30 Quiz 3 1...

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

Click to edit Master subtitle style 4/24/11 ENGR 132 Wed/Fri 3:30-5:30

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

View Full Document
4/24/11 Quiz 3 We want to write a function in Matlab called car_motion. There are two input arguments, velocity and acceleration. There are two output arguments, distance and time. Write the function definition line for this function.
4/24/11 Solution function [distance, time] = car_motion(velocity, acceleration) +1 for writing function +1 for having two output args separated by commas +1 for having output args in [] +1 for having the function name +1 for having two input args separated by commas +1 for having input args in () +1 for having an equal sign +3 for having everything in the correct order ie function [] = function_name() If they use other names for the variables that is fine, as long as it is clear they are representing the correct inputs/ outputs

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

View Full Document
Click to edit Master subtitle style

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.

Unformatted text preview: 4/24/11 ENGR 132 Thurs/Tues 9:30-11:30 4/24/11 Quiz 3 1. A function has the following function definition line function [area_c, circumference_c] =circle_calcs(radius) a) What is the function name? b) What are the input argument(s) c) What are the output argument(s) 2. When do we use data markers on plots? 4/24/11 Solution 1) a) circle_calcs b) radius c) area_c, circumference_c 2) Use markers for plotting experimental data 3) plot(time,height, ‘rv’) +2 +2 +2 +2 +2 ‘rv’ - or any marker they like – here is the list of colors/markers from Matlab help b blue . point ^ triangle (up) g green o circle < triangle (left) r red x x-mark > triangle (right) c cyan + plus p pentagram m magenta * star h hexagram y yellow s square k black d diamond w white v triangle (down)...
View Full Document

{[ snackBarMessage ]}

What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern