diary mlP06ratk.txt Vektorien määrittely: x = 1 2 3 4 5 y = 0 2 4 6 z = -4 -2 0 2 4 Ekat laskut: ans = -4 -4 0 8 20 ans = 20 {??? Error using ==> mtimes Inner matrix dimensions must agree. } Neliöt: ans = 1 4 9 16 25 {??? Error using ==> mpower Inputs must be a scalar and a square matrix. } Normit: ans = 7.4162 ans = 7.4162 ans = 7.4162 help normx = 1 2 3 4 5 y = 0 2 4 6 z = -4 -2 0 2 4 ans = -4 -4 0 8 20 ans = 20 {??? Error using ==> mtimes Inner matrix dimensions must agree. } x.*z ans = -4 -4 0 8 20 x x = 1 2 3 4 5 z z = -4 -2 0 2 4 x.*z ans = -4 -4 0 8 20 x x = 1 2 3 4 5 z' ans = -4 -2 0 2 4 x*z' ans = 20 x x = 1 2 3 4 5 z z = -4 -2 0 2 4 x*z {??? Error using ==> mtimes Inner matrix dimensions must agree. } ans = 1 4 9 16 25 {??? Error using ==> mpower Inputs must be a scalar and a square matrix. } ans = 7.4162 ans = 7.4162 ans = 7.4162 help index index not found. Use the Help browser search field to search the documentation, or type "help help" for help command options, such as help for methods. com.mathworks.mde.find.FindFiles.invoke epsi = 1.1102e-016 eps ans = 2.2204e-016 epsi = 1.1102e-016 ans = 2.2204e-016 docsearch index epsi = 1.1102e-016 ans = 2.2204e-016 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. Overloaded methods: codistributed/eps qfft/eps Reference page in Help browser doc eps A = 4 -5 2 1 b = 11 9 x = 4 1 ans = 11 11 9 9 A = 32 1 -40 1 B = 0 -40 ab = 0.5556 -17.7778 A = 32 1 -40 1 B = 0 -40 ab = 0.5556 -17.7778 ab = 5/9 -160/9 A = 32 1 -40 1 B = 0 -40 ab = 5/9 -160/9 ab = 5/9 -160/9 a = 5/9 b = -160/9 {??? Undefined function or variable 'C'. } A = 32 1 -40 1 B = 0 -40 ab = 5/9 -160/9 ab = 5/9 -160/9 a = 5/9 b = -160/9 ans = [ C, (5*F)/9 - 160/9] eps ans = 1/4503599627370496 num2str(a) ans = 0.55556 a a = 5/9