[BMEN 2401] - Final Exam Guide - Everything you need to know! (24 pages long)

80 views24 pages
29 Nov 2016
School
Course
Professor

Document Summary

Includes: basic commands, logical operators, matrices/arrays, and types of data classes. Basics: clc command: clears the command window but not the workspace (saves your variables, clear variable command: clears a specific variable from your workspace. Ex. clear x- clears the variable x: clear command: clears everything in the workspace. **can"t clear pre-definied variables in matlab: press up arrow in the command window to see what was just previously done, plot(independent variable, dependent variable) command: graphs your given variables. Ex. plot(x,y) gives graph of x versus y: suppress output with a semicolon (;) at the end of line. Arrays: definitions, building, characteristics: vectors/ matrices expressed by hat notation (i,j,k) or square brackets, labeled as (row x column, entering a column vector: x=[1;2;3], entering a row vector: x=[1,2,3], entering values into matrices: A=[1 2 3;4 5 6; 7 8 9] results in a 3x3 matrix. Linear indexing for matrices: column dominant for elements of a; given by the following positions.