matlab code 1 - i sqrt-1 unless you overwrite j sqrt-1...

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

View Full Document Right Arrow Icon
% end line for matlab ; don’t display in command window sqrt squareroot ^2 raise to a power variable names MUST begin with letter not include spaces not include special characters other than _ names are case sensitive variable names SHOULD NOT be same as internal Matlab functions ex. sin, cos, tan, sqrt, sum, max, min, log, log10, exp clear all gets rid of all substitutions for variables y=m*x+b must have * for multiplication or else will look for variable mx + addition - subtraction multiplication / division ^ raised to a power ^(1/5) raised to the fifth root
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i sqrt(-1) unless you overwrite j sqrt(-1) unless you overwrite round rounds the function fix throws away the fraction ceil takes you up to the next integer floor takes you down to the lower integer help ____ gives you all the information on that function ex help sin gives all information on sin k=1:1:10 first value, steps, last value k=1,2,3,4,5,6,7,8,9,10 logical operators > < ~ >= <= ~= == a>b x~=y (a>b) & (x~=y) (a>b) | (x~=y) ((a>b) | (x~=y)) & (a==y) a~=0 logical operation (try in Command Window) a=4;...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern