syllabus code program algorithm pseudo-code -English-like >> pwd ans = / >> ls Applications bin opt Library cores private Network dev sbin System etc sw User Information home tmp Users mach_kernel usr Volumes net var >> cd /Users/mweeks/matlab_work >> ls 1860v2.mp3 1860v2.wav 23CubistSelfPortrait.jpg 2600Hz.wav ACM_talk.m ... [long list of stuff removed] ... zero_crossing_score.m zero_pad.m zeros_on_circle.m >> ls h* halveColumns.m histogram.m harmonic10.m hmwk1.m ... hillsvalleys3b.m huffman_slow.m histo.m >> hello hello! >> ls -l hello* -rw-r--r-- 1 mweeks staff 121 Dec 2 2014 hello.c -rw-r--r-- 1 mweeks staff 17 Dec 2 2014 hello.m -rw-r--r-- 1 mweeks staff 8008 Dec 2 2014 hello.mexa64 -rw-r--r-- 1 mweeks staff 393260 Dec 2 2014 hello.wav -rw-r--r-- 1 mweeks staff 313 Dec 2 2014 hello2.m -rw-r--r-- 1 mweeks staff 472728 Dec 2 2014 hello2.wav -rw-r--r-- 1 mweeks staff 979 Dec 2 2014 hello_varargin.m -rw-r--r-- 1 mweeks staff 342 Dec 2 2014 hello_varargin.old -rw-r--r-- 1 mweeks staff 562 Dec 2 2014 hello_varargin2.m -rw-r--r-- 1 mweeks staff 662 Dec 2 2014 hello_varargin_original.m >> type hello.c /* hello world */ #include main (int argc, char *argv[]) { printf("hello world.\n"); return 0; } >> type helo.m Error using type File 'helo.m' not found. >> type hello.m disp('hello!'); >> disp('anything') anything >> disp(3) 3 >> disp(3-1) 2 >> disp('anything I want) disp('anything I want) | Error: String is not terminated properly. >> disp('anything I want)' disp('anything I want)' | Error: Expression or statement is incorrect--possibly unbalanced (, {, or [. >> disp('anything I want)') anything I want) >> disp('anything I want') anything I want >> disp('syntax errors'); syntax errors >> disp('logic errors'); logic errors >> disp('logic errors') logic errors >> a = 3; >> a a = 3 >> b Undefined function or variable 'b'. >> payrate = 12.34; >> hoursworked = 40; >> payrate * hourseworked Undefined function or variable 'hourseworked'. Did you mean: >> payrate * hoursworked ans = 493.6000 >> payrolltax = payrate * hoursworked *0.20 payrolltax = 98.7200 >> >> a = 3; >> >> a = 3; | Error: Unexpected MATLAB operator. >> a = 3; >> a = 4 a = 4 >> a a = 4 >> disp(a); 4 >> disp(a) 4 >> a = 4; b = 5; >> a a = 4 >> b b = 5 >>