{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

eng6notes

# eng6notes - Sec 1 Engineering Problem Solving Horizontal...

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

Sec 1 Engineering Problem Solving Horizontal position: x(t) = vtcos(theta) Vertical position: y(t) = vtsin(theta) – (gt^2)/2 Time: t = 2vsin(theta)/g Sec 2 Technical Computing Environment Area of trapezoid: A = (b1+b2)h/2 Temperature: Tc = 5/9(Tf-32) Special Variables Ans: default variable name Pi: ratio of circle circumference to its diameter Esp: smallest amount by which two numbers can differ Inf: infinity Nan: not a number Date: current date in a character string format Flops: count of floating-point operations Commands Who: lists the names of defined variables Whos: lists the names and sizes of defined variables Clear: clears all variables, resets default values of special variables Clear var: clears variable var Clc: clears the command window, homes the cursor (moves the prompt to the top line), but does no affect variables Clf: clears the current figure and thus clears the graph window More on: enables paging of the output in the command window More off: disables paging of the output in the command window Punctuation Semicolon: suppresses the display of the result Comma: place multiple commands on one line Percent sign: comment Ellipses: indicates the command continues on the next line Functions Abs(x): Absolute value Sign(x): sign, returns -1 if x<0, 0 if x=0, 1 if x>0 Exp(x): Exponential Log(x): natural logarithm Log10(x): logarithm(base 10) Sqrt(x): square root Rem(x,y): remainder of x/y Binary (base 2) form 53 = 00110101 Format Format short: 4 decimal digits Format long: 14 decimal digits Format short/long e: scientific notation Format short/long g; good Format bank: 2 decimal digits Format +: positive, negative, zero Format loose: line space Format compact: no line space Display Disp(variable) Disp(‘string’) Fprintf(‘\nThe temperature is %w.df degrees F\n’, temp) Sec 3 Files and File Management Diary file: saves all text from the matlab session as text in file Save data: stores all workspace values in the file data.mat Disp(ans): display results without identifying variable names

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.

{[ 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