02-Sep-2024 17:16:34 complex_numbers_test(): MATLAB/Octave version 6.4.0. Demonstrate complex number usage. complex_numbers_test01(): Demonstrate various ways of assigning a complex value. A1 = 1 + 2 * i = ( 1.000000, 2.000000 ) A2 = 1 + 2 * j = ( 1.000000, 2.000000 ) A3 = 1 + 2 * sqrt(-1) = ( 1.000000, 2.000000 ) A4 = complex(1,2) = ( 1.000000, 2.000000 ) complex_numbers_test02(): Apply intrinsic functions to COMPLEX variables a = (1.000000,2.000000) - a = (-1.000000,-2.000000) a + 3 = (4.000000,2.000000) a + 5 * i = (1.000000,7.000000) 4 * a = (4.000000,8.000000) a / 8 = (0.125000,0.250000) a * a = (-3.000000,4.000000) a^2 = (-3.000000,4.000000) 1/a = (0.200000,-0.400000) abs(a) = 2.236068 acos(a) = (1.143718,-1.528571) angle(a) = 1.107149 asin(a) = (0.427079,1.528571) atan(a) = (1.338973,0.402359) complex(1) = (1.000000,0.000000) complex(2,3) = (2.000000,3.000000) conj(a) = (1.000000,-2.000000) cos(a) = (2.032723,-3.051898) cosh(a) = (-0.642148,1.068607) exp(a) = (-1.131204,2.471727) imag(a) = 2.000000 log(a) = (0.804719,1.107149) log10(a) = (0.349485,0.480829) real(a) = 1.000000 sin(a) = (3.165779,1.959601) sinh(a) = (-0.489056,1.403119) sqrt(a) = (1.272020,0.786151) tan(a) = (0.033813,1.014794) tanh(a) = (1.166736,-0.243458) sum(b) = (9.000000,12.000000) product(b) = (-85.000000,20.000000) norm(b) = 9.539392 a'*a = (5.000000,0.000000) D = C * B ( 6.200000, 14.200000) ( 15.200000, 26.200000) ( 24.200000, 38.200000) complex_numbers_test(): Normal end of execution. 02-Sep-2024 17:16:34