Home >Common Problem >matlab fix function usage
matlab fix function usage
1. fix function: round towards zero
2. Usage instructions: y=fix(x) The function rounds the zero direction of the element in x to obtain y which is an integer array. For the complex number z, round the real part and imaginary part respectively
3, give an example
>> x = [1-2.9i 3+4.5i 5-6.7i 9-10.2i] x = 1.0000 - 2.9000i 3.0000 + 4.5000i 5.0000 - 6.7000i 9.0000 -10.2000i >> y = fix(x) y = 1.0000 - 2.0000i 3.0000 + 4.0000i 5.0000 - 6.0000i 9.0000 -10.0000i
The above is the detailed content of matlab fix function usage. For more information, please follow other related articles on the PHP Chinese website!