Basic elements of a program
-
Programming tools: Input/output (assign/graph-&-display) Repetition (for) Decision (if) Arrays List of numbers in brackets A comma or space separates numbers (columns) A semicolon separates row Zeros and ones Matrices: zeros() ones() Indexing (row,column) Colon Operator: Range of Data first:last or first:increment:last Manipulating Arrays & Matrices Transpose
17p doanhung_dtvtk10 19-03-2013 70 4 Download
-
Basic elements of program Input – Initialize, define or assign numerical values to variables. Set of command expressions – Operations applied to input variables that lead to the desired result. Output – Display (graphically or numerically) result.An example of technical computinAn example of technical computing Let us consider using the hyperbolic tangent to model a downhill section of a snowboard or snow ski facility. Let us first examine the hyperbolic tangent function by executing the command: ezplot( ‘tanh(x)’ )...
17p feteler 27-11-2012 59 2 Download