Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9e00233c authored by Nicolas Bellot's avatar Nicolas Bellot Committed by hhakim
Browse files

matlab wrapper conj raise error

parent 815f618f
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,7 @@ disp('Ok');
disp('test 5 : ctranspose is not yet implemented for complex scalar Faust');
disp('test 5 : complex transpose is not yet implemented for complex scalar Faust');
test_pass = 0;
expected_err_message='ctranspose is not yet implemented for complex scalar Faust';
F=Faust({ones(5,4),ones(4,7)+1i*ones(4,7)});
......@@ -170,6 +170,28 @@ disp('Ok');
disp('test 6 : conjugate is not yet implemented for Faust');
test_pass = 0;
expected_err_message='conjugate is not yet implemented for Faust';
F=Faust({ones(5,4),ones(4,7)+1i*ones(4,7)});
try
F_conj = conj(F);
catch ME
if strcmp(ME.message,expected_err_message)
test_pass = 1;
else
error([ 'error with a wrong message : ' ME.message ' must be : ' expected_err_message ]);
end
end
if(~test_pass)
error('failure');
end
disp('Ok');
......
......@@ -208,7 +208,7 @@ classdef Faust
%
% F_trans = ctranspose(F) is called for syntax F' (complex conjugate transpose) when F is a Faust.
%
% WARNING : currently Faust is a real matrix, so the conjugate transposition is the same as the real one
% WARNING : ctranspose is not yet implementd for complex Faust, only supported for real Faust
%
% See also transpose.
if (isreal(F))
......@@ -219,6 +219,25 @@ classdef Faust
end
function F_conj=conj(F)
%% CONJ ' Complex conjugate Faust (WARNING not implemented) (overloaded Matlab built-in function).
%
% F_trans = conj(F) For a complex F, conj(X) = REAL(F) - i*IMAG(F)
%
%
error('conjugate is not yet implemented for Faust');
end
......@@ -305,7 +324,7 @@ classdef Faust
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment