ENGR 101 Study Guide - Midterm Guide: Row And Column Vectors, Matlab, Minimax
Document Summary
Matlab cheat sheet: engr 101 exam 1 (fall 2018) Command sa(cid:448)e (cid:858)file. (cid:373)at(cid:859) load (cid:858)file. (cid:373)at(cid:859) help command doc command clear clc. Selects elements in a cell array (matrix of different types of data) Performs operations on a matrix, will take all elements of a matrix and provide answer as another matrix. Separates values in a vector or matrix, can also use a space. Ex. x = [1 2 3; 4 5 6] ex. (2:3); ex. (first number:step:last number) Must use {} to select elements of a cell array. Ex. dataset = [1 2 3; 4 5 6]; Answer = [2 4 6; 8 10 12] Double %% will create a highlighted set of lines of code. Add, multiply, subtract and divide numbers sum(x) prod(x) numel(x) length(x) size(x) Yields sum of x, will first find sum of the columns and return answer as a list. Returns m max value and i index where it was found.