ENG EK 127 Chapter Notes - Chapter 1: Exclusive Or, 8-Bit, Matlab
Document Summary
Variablename = expression: assigns value to variable. ; suppresses or prevents results from being shown. Ans: presents results of expression typed after prompt. Clear variable1 variable2: clears variable values listed. Types of variables: single, double, char, int8, int32, etc. Allows expressions to carry on to next line. Mathematical functions will follow order of operations. >>elfun: lists various functions such as trigonometric and rounding functions. Rand: outputs random number initial seed remains the same unless actively changed by user. Rng( default"): sets seed to to default value. Rand*n: sets interval of possible random values to (0,n) Random number range: set values for high and low -> rand*(high-low)+low. Randi(imax): generates random real number on [1,imax] Character or string is represented by single quotes: variable = x". Relational expressions: true or false (also called boolean/logical) Meaning greater than ; less than greater than or equals ; less than or equals equality ; inequality or.