This icon shall be used for a package that contains internal classes not to be directly utilized by a user.
Extends from Modelica.Icons.InternalPackage
(Icon for an internal package (indicating that the package should not be directly utilized by user)).
Name | Description |
---|---|
prime235Factorization | Factorization of an integer in prime numbers 2,3,5 |
rawRealFFT | Compute raw Fast Fourier Transform for real signal vector |
(info, amplitudes, phases) = rawRealFFT(u);
Raw interface to a function of the Kiss_FFT package to compute the FFT of a real, sampled signal. The input argument of this function is a Real vector u. size(u,1) must be even. An efficient computation is performed, if size(u,1) = 2^a*3^b*5^c (a,b,c Integer ≥ 0). The function computes a real FFT (Fast Fourier Transform) of u and returns the result in form of the outputs amplitudes and phases. Argument info provides additional information:
info = 0: Successful FFT computation. info = 1: size(u,1) is not even. info = 2: size(work,1) is not correct (= a protected utility array). info = 3: Another error.
Note, in the original publication about the efficient computation of FFT (Cooley and Tukey, 1965), the number of sample points must be 2^a. However, all newer FFT algorithms do not have this strong restriction and especially not the open source software KissFFT from Mark Borgerding used in this function.
(info, A, phases) = realFFT({0,0.1,0.2,0.4,0.5, 0.6})
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | u[:] | Signal for which FFT shall be computed (size(nu,1) MUST be EVEN and should be an integer multiple of 2,3,5, that is size(nu,1) = 2^a*3^b*5^c, with a,b,c Integer >= 0) |
Type | Name | Description |
---|---|---|
Integer | info | Information flag (0: FFT computed, 1: nu is not even, 2: nwork is wrong, 3: another error) |
Real | amplitudes[div(size(u, 1), 2) + 1] | Amplitudes of FFT |
Real | phases[div(size(u, 1), 2) + 1] | Phases of FFT |
(success, e2, e3, e5) = prime235Factorization(n);
Compute the factorization of input Integer n in prime numbers 2, 3, and 5. If this is possible, success = true and e2 is the number of prime numbers2, e3 the number of prime numbers 3 and e5 the number of prime numbers 5. If this is not possible, success = false, and e2, e3, e5 are dummy values.
(success, e2, e3, e5) = prime235Factorization(60) // success=true, e2=2, e3=1, e5=1 (= 2^2*3^1*5^1) (success, e2, e3, e5) = prime235Factorization(7) // success=false
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Integer | n |   |
Type | Name | Description |
---|---|---|
Boolean | success | = true, if factorization in 2,3,5 is possible |
Integer | e2 | n = 2^e2*3^e3*5^e5 |
Integer | e3 | n = 2^e2*3^e3*5^e5 |
Integer | e5 | n = 2^e2*3^e3*5^e5 |
Generated 2018-12-12 12:14:35 EST by MapleSim.