# Sum Function.pptx - Introducing the Sum Function LESSON#3...

• 40

This preview shows page 1 - 9 out of 40 pages.

Introducing the Sum() Function LESSON #3 Introducing the Sum() Function LESSON #3
Review Review Defining Variables newVar = existingVar(rows, columns); Defining Variables newVar = existingVar(rows, columns); FUNCTIONS plot(xVariable, yVariable, 'lineColorShape') FUNCTIONS plot(xVariable, yVariable, 'lineColorShape')
Review Review Defining Variables newVar = existingVar(rows, columns); Defining Variables newVar = existingVar(rows, columns); FUNCTIONS plot(xVariable, yVariable, 'lineColorShape') FUNCTIONS plot(xVariable, yVariable, 'lineColorShape') Variable you wish to create in your WorkSpace: Cannot start with a number Should not replace MATLAB functions Variable you wish to extract data from: Must be existing in WorkSpace prior to execution
Review Review Specifying x-variable explicitly: If xVariable is not specified then the x-axis will begin with 1, 2, 3, …, n The value of columns will be plotted against the y- axis: Multiple columns will result in multiple lines on plot Adjusting the line/color/shape of plot: Codes can be specified in single quotes Codes can be specified in any order Codes can specified in any combination Color codes 'r' (Red), 'g' (Green), 'b' (Blue), 'c' (Cyan), 'm' (Magenta), 'y' (Ye llow), 'k' (Black), 'w' (White) Shape codes '+' (Plus sign), 'o' (Circle), '*' (Asterisk), '.' (Point), 'x' (Cross), 's' (Square'), 'd' (Diamond), '^' (Upward-pointing triangle), 'v' (Downward-pointing triangle), '>' (Right-pointing triangle), '<' (Left-pointing triangle), 'p' (pentagram), 'h' (hexagram) Line codes '-' (Solid line), '--' (Dashed line), ':' (Dotted line), '-.'( Dash-dot line) Defining Variables newVar = existingVar(rows, columns); Defining Variables newVar = existingVar(rows, columns); FUNCTIONS plot(xVariable, yVariable, 'lineColorShape') FUNCTIONS plot(xVariable, yVariable, 'lineColorShape')
Today Today Defining Variables newVar = existingVar(rows, columns); newVar = existingVar(:); newVAr = [,,;,,]; Defining Variables newVar = existingVar(rows, columns); newVar = existingVar(:); newVAr = [,,;,,]; Functions plot(xVariable, yVariable, 'lineColorShape') newVAr = sum(variable, dimension); Functions plot(xVariable, yVariable, 'lineColorShape') newVAr = sum(variable, dimension); Linearization Defining new Variables Dimensions The sum() function Percentages Transpose Customizing an Axis
Linearization Linearization
Linearization Linearization Linearization Suppose we have the a 6x3 variable named dataX in our WorkSpace Specifying a single colon (:) will stack the columns Linearization Suppose we have the a 6x3 variable named dataX in our WorkSpace Specifying a single colon (:) will stack the columns