matlab code 1

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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background 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

This note was uploaded on 04/07/2011 for the course BME BME taught by Professor Dr.thomas during the Spring '11 term at Saint Louis.

Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online