2. Relational Operators Ex- a=[1 2 3]; b=[1 2 2]; a==b returns ans=1 1 0 since the last case did not match. Relational Operator Meaning < Less than <= Less than or equal > Greater than >= Greater than or equal == Equal ~= Not equal
3. Logical Operators and Functions Logical Operator Meaning & And | Or ~ Not Function Name Description ischar(x) Returns a 1 if x is a character string & 0 otherwise isfinite(x) Returns a 1 if elements of x are finite else 0 isinf(x) Returns 1 where elements of x are infinite else 0 ismember(x,y) Returns 1 when elements of x are also in y else 0 isreal(x) Returns 1 whenever the elements of x have no imaginary part and a 0 otherwise
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16. Some basic I/O commands Command Description break Exits while or for loop disp Displays text or matrix echo Displays m-files during execution error Displays error messages format Switches output display to a particular format fprintf Displays text and matrices and specifies format for printing values input Allows user input keyboard Invokes the keyboard as an m-file pause Causes an m-file to stop executing, pressing any key causes resumption of program execution