MAE 205 Midterm #1 - Copy (2)

.docx

School

California State University, Long Beach *

*We aren’t endorsed by this school

Course

205

Subject

Aerospace Engineering

Date

Apr 3, 2024

Type

docx

Pages

5

Uploaded by KidKookabura3563 on coursehero.com

California State University, Long Beach Mechanical and Aerospace Engineering Department MAE 205 Computer method in MAE Professor: M. Lackpour Midterm #1 Write your final answer in the specified area. No credit will be given to illegible work. Group No.:____________________________________ ____________________ Total Score: __________/100 pts 1. [10 pts] Write the exact MATLAB expression(s) used to calculate the following mathematical expression cos ( 2 π ) + 10 / 5 __________________________________________ e x + 3 x 2 ,where x = 4 __________________________________________ 3 8 + | x cos ( π ) | __________________________________________ tan ( 36 ° ) __________________________________________ sin 1 ( 5 | x | ) ,where x = 7 ___________________________________________ 2. [10 pts] Determine whether the following MATLAB command are valid or invalid. If the commands are valid, give the final output. If the command are invalid, explain why. K$=5 ____________________________________________ Velocity2= 3 ____________________________________________ (3/2)*sin(pi)+cos(pi/2) ____________________________________________ (2\3)*8^(1/3) _____________________________________________ (3/2)*abs(-2)+mod(1,3) _____________________________________________
3. [10 pts] Given the matrices A, B, C, and D below. Answer the following questions. A = [ 2 1 0 4 4 1 9 5 0 3 9 1 ] B = [ 5 1 7 ] C = [ 2 8 5 ] D = [ 1 0 2 9 3 4 1 0 5 4 1 7 ] a. What is the size of A*B? __________ b. What is the product of C*D? __________ c. What is the product of B. C ' ? __________ d. What is the sum of A + D ' ? _____________ e. Give the element (2,2) of the product B*C? __________ 4. [10 pts] Given the matrices A, B, C, and D below. Evaluate the following expressions. A = [ 1 9 8 1 2 1 4 0 5 1 8 3 5 8 5 7 5 1 1 6 ] B = | 1 8 7 9 4 | C = [ 1 2 7 ] D = [ 1 0 0 0 1 0 0 0 1 ] 4.1 C(2)*D(:,2) 4.2 A.*A 4.3 C(2:3)*B(2:4) 4.4 A(1:3,1:2:end)*D
4.5 E=[D(:,2) A(2:end,end) B(1:3)] 5. [10 pts] Write the exact MATALB command that performs the task asked. Assume that the variables are known but I just want the command performs the indicated task. 5.1 Write the MATLAB command that plots variables X vs. Y and T vs. W in the same plot with one line of code. Provides line specifications that distinguish each of the plots. 5.2 Write the MATLAB command that plots the function G ( x ) = sin ( 2 x ) + 2 x for the range -5<x<5 with one line of code. 6. [10 pts] For the function Y = X^2 – X/(X+3) , calculate the value of y for the following values of x using element-by-element operations: 0,1, 2, 3 , 4, 5, 6, 7
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help