CPS 118 Study Guide - Final Guide: Deconvolution, C Mathematical Functions, Relational Operator
Document Summary
May store the comparison answer in a vector. A b a&b or | xor , not~ 3: multiplication, division * , addition, subtraction + , relational operators (>, =, <=, ==, ~=) X an even number mod(x,2)= = 0. Loop: if there are any steps you must repeat to solve the problem. For-end loop: a counting loop, know the number of repetitions in advance. While-end loop: a conditional loop, if not know the number of repetitions in advance. Using functions can use the same code in more than one place in program without rewriting; can use the code by calling in the same function from different programs. Must start with the function keyword, use the same file name under function. Lesson 10: polynomials c=[5 0 0 6 -7 0] 5x^5+0x^4+0x^3+6x^2-7x+0 a=[8 5]; b= polyval (a,3) b=8*3+5=29 r=roots(p) roots of polynomial r=[-1 -1 2 3]; p=ploy(r) p=ploy(r)