help HELP topics: Documents/MATLAB - (No table of contents file) matlab/demos - Examples. matlab/graph2d - Two dimensional graphs. matlab/graph3d - Three dimensional graphs. matlab/graphics - Handle Graphics. graphics/obsolete - (No table of contents file) matlab/plottools - Graphical plot editing tools matlab/scribe - Annotation and Plot Editing. scribe/obsolete - (No table of contents file) matlab/specgraph - Specialized graphs. matlab/uitools - Graphical user interface components and tools uitools/obsolete - (No table of contents file) hardware/stubs - (No table of contents file) matlab/images - (No table of contents file) toolbox/local - General preferences and configuration information. matlab/optimfun - Optimization and root finding. matlab/codetools - Commands for creating and debugging code matlab/datafun - Data analysis and Fourier transforms. matlab/datamanager - (No table of contents file) matlab/datastoreio - (No table of contents file) matlab/datatypes - Data types and structures. matlab/elfun - Elementary math functions. matlab/elmat - Elementary matrices and matrix manipulation. matlab/funfun - Function functions and ODE solvers. matlab/general - General purpose commands. matlab/guide - Graphical user interface design environment matlab/helptools - Help commands. matlab/iofun - File input and output. matlab/lang - Programming language constructs. matlab/mapreduceio - (No table of contents file) matlab/matfun - Matrix functions - numerical linear algebra. matlab/ops - Operators and special characters. matlab/polyfun - Interpolation and polynomials. matlab/randfun - Random matrices and random streams. matlab/sparfun - Sparse matrices. matlab/specfun - Specialized math functions. matlab/strfun - Character strings. matlab/testframework - (No table of contents file) matlab/timefun - Time and dates. matlab/verctrl - Version control. matlab/apps - (No table of contents file) matlab/audiovideo - Audio and Video support. shared/comparisons - (No table of contents file) connector/connector - connector Enable or disable the MATLAB Connector. The MATLAB Connector allows you to access a MATLAB session on a desktop from a mobile device using MATLAB Mobile. hdllib/ml_lib - (No table of contents file) matlab/imagesci - (No table of contents file) shared/instrument - (No table of contents file) shared/m3i - (No table of contents file) matlab/networklib - Network support. interfaces/python - (No table of contents file) controllib/general - Control System Toolbox -- General Utilities. controllib/graphics - Control Library - Graphics. graphics/utils - (No table of contents file) graphics/plotoptions - (No table of contents file) shared/dastudio - (No table of contents file) shared/rptgen - (No table of contents file) matlab/timeseries - Time series data visualization and exploration. matlab/hds - (No table of contents file) matlab/toolbox_packaging - (No table of contents file) matlab/webcam - Webcam support. webservices/restful - (No table of contents file) interfaces/webservices - Web services interface. help elfun Elementary math functions. Trigonometric. sin - Sine. sind - Sine of argument in degrees. sinh - Hyperbolic sine. asin - Inverse sine. asind - Inverse sine, result in degrees. asinh - Inverse hyperbolic sine. cos - Cosine. cosd - Cosine of argument in degrees. cosh - Hyperbolic cosine. acos - Inverse cosine. acosd - Inverse cosine, result in degrees. acosh - Inverse hyperbolic cosine. tan - Tangent. tand - Tangent of argument in degrees. tanh - Hyperbolic tangent. atan - Inverse tangent. atand - Inverse tangent, result in degrees. atan2 - Four quadrant inverse tangent. atan2d - Four quadrant inverse tangent, result in degrees. atanh - Inverse hyperbolic tangent. sec - Secant. secd - Secant of argument in degrees. sech - Hyperbolic secant. asec - Inverse secant. asecd - Inverse secant, result in degrees. asech - Inverse hyperbolic secant. csc - Cosecant. cscd - Cosecant of argument in degrees. csch - Hyperbolic cosecant. acsc - Inverse cosecant. acscd - Inverse cosecant, result in degrees. acsch - Inverse hyperbolic cosecant. cot - Cotangent. cotd - Cotangent of argument in degrees. coth - Hyperbolic cotangent. acot - Inverse cotangent. acotd - Inverse cotangent, result in degrees. acoth - Inverse hyperbolic cotangent. hypot - Square root of sum of squares. Exponential. exp - Exponential. expm1 - Compute exp(x)-1 accurately. log - Natural logarithm. log1p - Compute log(1+x) accurately. log10 - Common (base 10) logarithm. log2 - Base 2 logarithm and dissect floating point number. pow2 - Base 2 power and scale floating point number. realpow - Power that will error out on complex result. reallog - Natural logarithm of real number. realsqrt - Square root of number greater than or equal to zero. sqrt - Square root. nthroot - Real n-th root of real numbers. nextpow2 - Next higher power of 2. Complex. abs - Absolute value. angle - Phase angle. complex - Construct complex data from real and imaginary parts. conj - Complex conjugate. imag - Complex imaginary part. real - Complex real part. unwrap - Unwrap phase angle. isreal - True for real array. cplxpair - Sort numbers into complex conjugate pairs. Rounding and remainder. fix - Round towards zero. floor - Round towards minus infinity. ceil - Round towards plus infinity. round - Round towards nearest integer. mod - Modulus (signed remainder after division). rem - Remainder after division. sign - Signum. help floor floor Round towards minus infinity. floor(X) rounds the elements of X to the nearest integers towards minus infinity. See also round, ceil, fix. Other functions named floor Reference page in Help browser doc floor doc doc eps pwd ans = /Users/pauldj/works/courses/LSC/LSC-18/FPA a {Undefined function or variable 'a'. } pi ans = 3.1416 format long pi ans = 3.141592653589793 pi = 3.2 pi = 3.200000000000000 pi pi = 3.200000000000000 i ans = 0.000000000000000 + 1.000000000000000i sqrt(-1) ans = 0.000000000000000 + 1.000000000000000i sqrt(-1) == i ans = 1 for i = 1:10, i^2, end ans = 1 ans = 4 ans = 9 ans = 16 ans = 25 ans = 36 ans = 49 ans = 64 ans = 81 ans = 100 i i = 10 clear('i') i ans = 0.000000000000000 + 1.000000000000000i clear('pi') pi ans = 3.141592653589793 j ans = 0.000000000000000 + 1.000000000000000i a = -10, b = 10; c = pi a = -10 c = 3.141592653589793 b b = 10 whos Name Size Bytes Class Attributes a 1x1 8 double ans 1x1 16 double complex b 1x1 8 double c 1x1 8 double eps ans = 2.220446049250313e-16 help eps eps Spacing of floating point numbers. D = eps(X), is the positive distance from ABS(X) to the next larger in magnitude floating point number of the same precision as X. X may be either double precision or single precision. For all X, eps(X) is equal to eps(ABS(X)). eps, with no arguments, is the distance from 1.0 to the next larger double precision number, that is eps with no arguments returns 2^(-52). eps('double') is the same as eps, or eps(1.0). eps('single') is the same as eps(single(1.0)), or single(2^-23). Except for numbers whose absolute value is smaller than REALMIN, if 2^E <= ABS(X) < 2^(E+1), then eps(X) returns 2^(E-23) if ISA(X,'single') eps(X) returns 2^(E-52) if ISA(X,'double') For all X of class double such that ABS(X) <= REALMIN, eps(X) returns 2^(-1074). Similarly, for all X of class single such that ABS(X) <= REALMIN('single'), eps(X) returns 2^(-149). Replace expressions of the form if Y < eps * ABS(X) with if Y < eps(X) Example return values from calling eps with various inputs are presented in the table below: Expression Return Value =========================================== eps(1/2) 2^(-53) eps(1) 2^(-52) eps(2) 2^(-51) eps(realmax) 2^971 eps(0) 2^(-1074) eps(realmin/2) 2^(-1074) eps(realmin/16) 2^(-1074) eps(Inf) NaN eps(NaN) NaN ------------------------------------------- eps(single(1/2)) 2^(-24) eps(single(1)) 2^(-23) eps(single(2)) 2^(-22) eps(realmax('single')) 2^104 eps(single(0)) 2^(-149) eps(realmin('single')/2) 2^(-149) eps(realmin('single')/16) 2^(-149) eps(single(Inf)) single(NaN) eps(single(NaN)) single(NaN) See also realmax, realmin. Reference page in Help browser doc eps eps(3) ans = 4.440892098500626e-16 3+eps(3) ans = 3.000000000000000 3+eps(3.0) ans = 3.000000000000000 eps = 1.23 eps = 1.230000000000000 eps eps = 1.230000000000000 sin(3.4) ans = -0.255541102026831 sin(3.4,3) {Error using sin Too many input arguments. } sin(exp) {Error using exp Not enough input arguments. } sin(pi) ans = 1.224646799147353e-16 cos(0) ans = 1 cos(pi) ans = -1 sin(0) ans = 0 sin(pi) ans = 1.224646799147353e-16 sin(pi/2) ans = 1 single(eps) ans = 1.2300000 clear('eps') single(eps) ans = 2.2204460e-16 single(eps(1)) ans = 2.2204460e-16 help eps eps Spacing of floating point numbers. D = eps(X), is the positive distance from ABS(X) to the next larger in magnitude floating point number of the same precision as X. X may be either double precision or single precision. For all X, eps(X) is equal to eps(ABS(X)). eps, with no arguments, is the distance from 1.0 to the next larger double precision number, that is eps with no arguments returns 2^(-52). eps('double') is the same as eps, or eps(1.0). eps('single') is the same as eps(single(1.0)), or single(2^-23). Except for numbers whose absolute value is smaller than REALMIN, if 2^E <= ABS(X) < 2^(E+1), then eps(X) returns 2^(E-23) if ISA(X,'single') eps(X) returns 2^(E-52) if ISA(X,'double') For all X of class double such that ABS(X) <= REALMIN, eps(X) returns 2^(-1074). Similarly, for all X of class single such that ABS(X) <= REALMIN('single'), eps(X) returns 2^(-149). Replace expressions of the form if Y < eps * ABS(X) with if Y < eps(X) Example return values from calling eps with various inputs are presented in the table below: Expression Return Value =========================================== eps(1/2) 2^(-53) eps(1) 2^(-52) eps(2) 2^(-51) eps(realmax) 2^971 eps(0) 2^(-1074) eps(realmin/2) 2^(-1074) eps(realmin/16) 2^(-1074) eps(Inf) NaN eps(NaN) NaN ------------------------------------------- eps(single(1/2)) 2^(-24) eps(single(1)) 2^(-23) eps(single(2)) 2^(-22) eps(realmax('single')) 2^104 eps(single(0)) 2^(-149) eps(realmin('single')/2) 2^(-149) eps(realmin('single')/16) 2^(-149) eps(single(Inf)) single(NaN) eps(single(NaN)) single(NaN) See also realmax, realmin. Reference page in Help browser doc eps eps(single(1)) ans = 1.1920929e-07 [1, 2, 3, 4] ans = 1 2 3 4 v = [1, 2, 3, 4] v = 1 2 3 4 whos('v') Name Size Bytes Class Attributes v 1x4 32 double w = [1, 2, 3, 4]' w = 1 2 3 4 whos('w') Name Size Bytes Class Attributes w 4x1 32 double w(3) ans = 3 v(3) ans = 3 [1, 2, 3, 4](3) [1, 2, 3, 4](3) | {Error: Unbalanced or unexpected parenthesis or bracket. } ([1, 2, 3, 4])(3) ([1, 2, 3, 4])(3) | {Error: Unbalanced or unexpected parenthesis or bracket. } v = [1, 2, 3, 4] v = 1 2 3 4 v(3) ans = 3 v v = 1 2 3 4 w == v' ans = 1 1 1 1 pwd ans = /Users/pauldj/works/courses/LSC/LSC-18/FPA quit