Escolar Documentos
Profissional Documentos
Cultura Documentos
angle(3+4i)
ans = 0.9273
angle(4+3i)
ans = 0.6435
Floating point numbers have finite range of roughly 10e-308 to 10e+308 eps- floating point relative precision e = 2e-52 realmin smallest floating point no. 2e1022 realmax smallest floating point no. 2e+1022
MATLAB uses column oriented analysis. >> D = [25 50 75; 75 60 38; 50 50 60] >> D(:,1) is say for subject1 and so on >> mu = mean(D) >> sigma = std(D) >> X= [2.1 1.7 1.6 1.5 NaN 1.9 1.8 1.5 5.1 1.8 1.4 2.2 1.6 1.8] >> X = X(isfinite(X)) 5.1 is outline, remove elements of more than three standard deviations from the mean >> X = X(abs(X-mean(X))<=3*std(X))
Make non-prime numbers Zero >> A(~isprime(A)) = 0 >> A = [1 2 3; 4 5 6;7 8 9] >> k = find(isprime(A))'
Format function
>> x = [4/3 1.2348e-6] FORMAT may be used to switch between different output display formats of all float variables as follows: FORMAT SHORT Scaled fixed point format with 5 digits. FORMAT LONG Scaled fixed point format with 15 digits for double and 7 digits for single. FORMAT SHORT E Floating point format with 5 digits. FORMAT LONG E Floating point format with 15 digits for double and 7 digits for single. FORMAT SHORT G Best of fixed or floating point format with 5 digits. FORMAT LONG G Best of fixed or floating point format with 15 digits for double and 7 digits for single.