ENGR 132 - QUIZ4 - 2. r, A, C +2 for [A,C]= +2 for...

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

View Full Document Right Arrow Icon
Click to edit Master subtitle style 4/24/11 ENGR 132 Wed/Fri 3:30-5:30
Background image of page 1

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

View Full DocumentRight Arrow Icon
4/24/11 Quiz 4 The following function is available in the current folder in Matlab. The input argument is circle radius and output arguments are area and circumference. A vector of circle radii has been created in Matlab in the command window, >> r=1:4 Write the line of code that must be entered into the function [area_c,circum_c]=circle_calcs(radius ) % header area_c=pi*radius.^2; circum_c=2*pi*radius;
Background image of page 2
4/24/11 Solution 1. [A,C] = circle_calcs(r)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2. r, A, C +2 for [A,C]= +2 for circle_calcs +2 for (r) +4 (all or nothing) Click to edit Master subtitle style 4/24/11 ENGR 132 Thurs/Tues 9:30-11:30 4/24/11 Quiz 4 The following function exists in the current folder in Matlab The following has been entered in the Matlab command window >> c=5; >> d=2; function [x,y]=my_function(a,b) % header comments c=-1; x=c*b; y=a+c; 4/24/11 Solution c = 5 d = 2 v = -2 w = 4 +2 +2 +2 +2 +2 for not including a, b, x, or y (all or nothing)...
View Full Document

This note was uploaded on 04/23/2011 for the course ENGR 132 taught by Professor Kutson during the Spring '11 term at Purdue University-West Lafayette.

Page1 / 6

ENGR 132 - QUIZ4 - 2. r, A, C +2 for [A,C]= +2 for...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online