HW1.pdf - Week 1 Homework Name: Zech Peiffer ENGR 112...

This preview shows page 1 - 5 out of 21 pages.

The preview shows page 3 - 5 out of 21 pages.
Week 1 HomeworkENGR 112Variables and equationsName: Zech PeifferLab Time:T 12:00pmNames of people you worked with:Kevin (TA)Websites you used:Documentation search barApproximately how many hours did it take you tocomplete this assignment (to nearest whole number)?8 HoursBy writing or typing your name below you affirm that all of the workcontained herein is your own, and was not copied or copied and altered.Zech PeifferNote: Failure to sign this page will result in a 50-point penalty. Failure to list people youworked with may result in no grade for this homework. Failure to fill out hoursapproximation will result in a 10-point penalty.Turn .zip files to Canvas or your assignment will not be graded
Week 1 HomeworkENGR 112Variables and equationsBEFORE YOU BEGIN1)Please read “ENGR 112Assignment Instructions.pdf” in the Canvas module “StartHere.”Learning Objectives:You should be able to answer the following questions:What is a script file?What is the difference between a script file and the command window?How do you create variables?How can you examine the values of variables?How do you create equations, pass them variables, and print out the results?How do you display the values of variables?Homework Guidelines:1)Write one script per problem. Name each script somethingyou’ll remember (e.g.“prob1trigFunc.m”).2)Start problems with pseudo code (comments with %).a.Write an English description of the script/function at the top of the page.b.Outline your steps as comments before writing actual code.3)Write your MATLAB statement(s) under each pseudocode step.a.Variables need units next to them as a comment.4)Print results as fully formed sentences with fprintf().a.Use the correct number of decimal places for numbers andinclude units(if any).5)Copy all required components into spaces below problem.Specific Coding Notes:Use variables for constants in equations (where it makes sense).Example:You have the equation “y = a + b2”. Givena = 2andb = 4, findy.NO😊YES😊% Calculate yy = 2 + 4 - 2;% Declare variables FIRSTa = 2;b = 4;% Use those variables in theequationy = a + b - 2;
Week 1 HomeworkENGR 112Variables and equationsGrading CheckpointsCriteriaComponentNoYes[30%] Comments andPseudocodeDeclared units on all variables?XEnglish description of problem at top?XComments outlining your steps?X[20%] Output formattingUsed fprintf() to make complete sentences(when required)?XCorrect units on answers?XCorrect number of decimal places?X[50%] FunctionalityScript computes correct value(s)?XCorrectly converted units in script whenneeded?X
Week 1 HomeworkENGR 112Variables and equationsProblem 1From elementary physics, we know that the distance a projectile travels (e.g. when firedfrom a cannon) depends on both the initial velocity𝑣and the launch angle𝜃?(?) = 𝑣 ? cos(𝜃)?(?) = 𝑣 ? sin(𝜃) −12𝑔?2wherex(t)andy(t)are the distances traveled inxandyrespectively after timepassed (gis gravity,g= 9.8 meters/second2).:thas

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 21 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Winter
Professor
Staff
Tags
Cartesian Coordinate System, Polar coordinate system

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture