% diary is not diary while(1) , x=1; end a=1 a = 1 format compact a=1 a = 1 more off 2+3 ans = 5 2-3 ans = -1 2*3 ans = 6 2 3 2 3  {Error: Unexpected MATLAB expression. } 2/3 ans = 0.6667 2^3 ans = 8 1.5/.5 ans = 3 1.0546e-34 ans = 1.0546e-34 0.0000000000000000000000000000000000000000010546 ans = 1.0546e-42 0.000000000000000000000000000000000 ans = 0 10546 ans = 10546 1.0546e-34^2 ans = 1.1122e-68 1/0 ans = Inf 0/0 ans = NaN 1.0546e-34^10 ans = 0 1.0546e-34^(-10) ans = Inf (1/3)+(1/3)+(1/3)-1 ans = 0 (1/3)+(1/3)+(1/3)+(1/3)+(1/3)+(1/3)-2 ans = -2.2204e-16 (1000/3)+(1000/3)+(1000/3)+(1000/3)+(1000/3)+(1000/3)-2000 ans = -2.2737e-13 eps(1) ans = 2.2204e-16 eps(1000) ans = 1.1369e-13 sin(30) ans = -0.9880 sin(pi/6) ans = 0.5000 sind(30) ans = 0.5000 pi ans = 3.1416 sin(10*pi) ans = -1.2246e-15 sin(100000000000000000000*pi) ans = -0.3941 i^2 ans = -1 (1+i)^2 ans = 0.0000 + 2.0000i i=1 i = 1 i i = 1 i^2 ans = 1 who Your variables are: a ans i x clear i i ans = 0.0000 + 1.0000i j ans = 0.0000 + 1.0000i (1+i)*(1-i) ans = 2 sin(1+i)*sin(1-i) ans = 2.0892 2+3*4 ans = 14 2+(3/4) ans = 2.7500 2+(3*4) ans = 14 (2+3)*4 ans = 20 12/2*3 ans = 18 % highest: ^ % next: * and / % lowest: + and - publish('hw1.m','pdf') {Error using publish (line 98) Cannot find "hw1.m".} publish('hw1.m','pdf') ans = \\print2\dommelen\My Documents\MATLAB\html\hw1.pdf uiopen('Z:\My Documents\MATLAB\hw1.m',1) hw1.m {Undefined variable "hw1" or class "hw1.m".} hw1 ans = 3.5000 ans = 2 publish('hw1.m','pdf') {Error using publish (line 144) The output file "\\print2\dommelen\My Documents\MATLAB\html\hw1.pdf" is not writable.} publish('hw1.m','pdf') ans = \\print2\dommelen\My Documents\MATLAB\html\hw1.pdf help error error Display message and abort function. error(MSGID, ERRMSG, V1, V2, ...) displays a descriptive message ERRMSG when the currently-running program encounters an error condition. Depending on how the program code responds to the error, MATLAB then either enters a catch block to handle the error condition, or exits the program. MSGID is a unique message identifier string that MATLAB attaches to the error message to better identify the source of the error (see MESSAGE IDENTIFIERS, below). ERRMSG is a character string that informs the user about the cause of the error and can also suggest how to correct the faulty condition. The ERRMSG string may include predefined escape sequences, such as \n for newline, and conversion specifiers, such as %d for a decimal number. Inputs V1, V2, etc. represent values or substrings that are to replace conversion specifiers used in the ERRMSG string. The format is the same as that used with the SPRINTF function. error(ERRMSG, V1, V2, ...) reports an error without including a message identifier in the error report. error(ERRMSG) is the same as the above syntax, except that the ERRMSG string contains no conversion specifiers, no escape sequences, and no substitution value (V1, V2, ...) arguments. error(MSGSTRUCT) reports the error using fields stored in the scalar structure MSGSTRUCT. This structure can contain these fields: message - Error message string identifier - See MESSAGE IDENTIFIERS, below stack - Struct similar to the output of the DBSTACK function If MSGSTRUCT is an empty structure, no action is taken and error returns without exiting the program. If you do not specify the stack, the error function determines it from the current file and line. MESSAGE IDENTIFIERS A message identifier is a string of the form [component:]component:mnemonic that enables MATLAB to identify with a specific error. The string consists of one or more COMPONENT fields followed by a single MNEMONIC field. All fields are separated by colons. Here is an example identifier that has 2 components and 1 mnemonic. 'myToolbox:myFunction:fileNotFound' The COMPONENT and MNEMONIC fields must begin with an upper or lowercase letter which is then followed by alphanumeric or underscore characters. The COMPONENT field specifies a broad category under which various errors can be generated. The MNEMONIC field is a string normally used as a tag related to the particular message. From the command line, you can obtain the message identifier for an error that has been issued using the MException.last function. See also MException, MException/throw, try, catch, sprintf, dbstop, errordlg, warning, disp, dbstack. Reference page for error help erf erf Error function. Y = erf(X) is the error function for each element of X. X must be real. The error function is defined as: erf(x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt. See also erfc, erfcx, erfinv, erfcinv. Reference page for erf Other functions named erf doc erf who Your variables are: a ans x y clear who x=3 x = 3 x x = 3 who x Your variables are: x who Your variables are: x whos Name Size Bytes Class Attributes x 1x1 8 double x=x+7 x = 10 x x = 10 x==x+7 ans = 0 x==x ans = 1 x=x+x x = 20 x=x+x x = 40 x=x+x x = 80 x=1 x = 1 y=2 y = 2 x=y; y=x; x=1 x = 1 y y = 2 temp=x temp = 1 x=y x = 2 y=temp y = 1 pi ans = 3.1416 pi=3.2 pi = 3.2000 clear pi