Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 01d18e46 authored by hhakim's avatar hhakim
Browse files

Fix matfaust.dst complex(sparse_matrix) error for older versions of Matlab.

Matlab R2022b doesn't need this fix.

================================================================================
Error occurred in FaustFactoryTest/test_dst and it did not run to
completion.

    ---------
    Error ID:
    ---------
    'MATLAB:complex:expectsFullNumeric'

    --------------
    Error Details:
    --------------
    Error using complex
    Input A must be numeric and full.

    Error in matfaust.dst>mod_fft (line 160)
        F = matfaust.Faust([Bs, {complex(bitrev_perm(N))}],
varargin{:});

    Error in matfaust.dst (line 90)
        MDFT = mod_fft(n, 'dev', dev);

    Error in FaustFactoryTest/test_dst (line 846)
                DST = matfaust.dst(n, 'normed', false);
================================================================================
parent 746b0b90
No related branches found
No related tags found
No related merge requests found
......@@ -159,5 +159,13 @@ function F = mod_fft(N, varargin)
i = i + 1;
N_ = N_ / 2;
end
F = matfaust.Faust([Bs, {complex(bitrev_perm(N))}], varargin{:});
%F = matfaust.Faust([Bs, {complex(bitrev_perm(N))}], varargin{:});
%BR = complex(bitrev_perm(N)); % complex of sparse matrix doesn't work for matlab R2018b, it works for R2022b but I don't know since which version exactly
BR = complex(matfaust.Faust(bitrev_perm(N)));
F = matfaust.Faust(Bs) * BR;
if length(varargin) > 0
if strcmp(varargin{1}, 'dev') && ~ strcmp(varargin{2}, 'cpu')
F = clone(F, varargin{1:2});
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment