{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

LabA solutions1 - PROBLEM 3-A.1 clc clear angle = 45...

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

View Full Document Right Arrow Icon
-------------------------------------------------------------- % PROBLEM 3-A.1 clc, clear angle = 45 % degrees angleRad = angle * (pi/180) % radians % student then resets angle, and runs the line setting angleRad % from the history window % -------------------------------------------------------------- % PROBLEM 3-A.2 clc, clear x = 5 % indep var y = x - 5 % dep var z = 3*y^2 - 16*y + 74 % dep var % student resets x, then recomputes y and z using the % history window % -------------------------------------------------------------- % PROBLEM 3-A.4 % A scalar in MATLAB is a simple number; one number. A vector in % MATLAB is a linear (1-D) group of numbers. An array in MATLAB is % a table (2-D) of numbers. In science and engineering theory, a % vector is an entity that has both magnitude and direction, like % velocity. The corresponding scalar to the velocity vector is % called speed. There is a table like entity in science and % engineering theory called a tensor, but that is beyond the scope % of this book. % -------------------------------------------------------------- % PROBLEM 3-A.5 % Both forceX and forceY are scalars. % -------------------------------------------------------------- % PROBLEM 3-A.6 clc, clear angle = 45 % degrees angleRad = angle * (pi/180) % radians cosAngle = cos(angleRad) sinAngle = sin(angleRad) % -------------------------------------------------------------- % PROBLEM 3-A.7 clc, clear alpha = 45; % degrees angleRad = alpha * (pi/180) % radians cosAngle = cos(angleRad) sinAngle = sin(angleRad) z = cosAngle^2 + sinAngle^2
Background image of page 1

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

View Full Document Right Arrow Icon
% --------------------------------------------------------------
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}