COSC-2836EL Lecture Notes - Lecture 1: Matlab, Text Editor, Nan
Document Summary
Use as a scientific (graphing) calculator: by default, gives to four digits of precision with rounding. By using help cmd will access the help manual for the command; includes usage, syntax, and a description of the function. Placing a semi-colon at the end of a statement will supress the output from matlab. Saving work to text file (allows work to be read in outside text editor): cmd: diary name, cmd: diary off ends file save. Variable assignment: saves a value from a calculation; case sensitive (similar to java language: >> a = 1; To expand the number of precision digits shown (unless otherwise stated, use default precision. [4 digits] for assignments: cmd: format short default precision; 4 digits, cmd: format long. Vector notation: (1: 1: 10) = one to ten; intervals of one: 1 2 3 4 5 6 7 8 9 10.