Mentions légales du service

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

wrapper matlab : doc latex + test

parent f92abf59
No related branches found
No related tags found
No related merge requests found
...@@ -26,12 +26,16 @@ As much as possible, a \textbf{matlab{\_}faust} object is handled as a normal ma ...@@ -26,12 +26,16 @@ As much as possible, a \textbf{matlab{\_}faust} object is handled as a normal ma
>> y2 = A'*x2; >> y2 = A'*x2;
>> >>
>> >>
>> % get the 2-norm (spectral norm) of the faust A
>> norm_A = norm(A); % equivalent to norm(A,2);
>>
>> % get the coefficient i,j and slicing for reading purpose >> % get the coefficient i,j and slicing for reading purpose
>> coeff=A(i,j); >> coeff=A(i,j);
>> col_2=A(:,2); >> col_2=A(:,2);
>> submatrix_A=A(3:5,2:3); >> submatrix_A=A(3:5,2:3);
>> submatrix_A=A(2:end,3:end-1);
>> % Warning : A(i,j)=3 will not modify A, writing is not allowed >> % Warning : A(i,j)=3 will not modify A, writing is not allowed
>> % Warning : A(end,end) give the wrong result
\end{lstlisting} \end{lstlisting}
......
...@@ -426,10 +426,19 @@ disp('Ok'); ...@@ -426,10 +426,19 @@ disp('Ok');
disp('TEST 2-norm : '); disp('TEST 2-norm : ');
real_norm=norm(F_dense); real_norm=norm(F_dense);
norm_faust=norm(F); norm_faust=norm(F);
norm_faust2=norm(F,2);
norm_faust_trans=norm(F_trans);
if (abs(real_norm - norm_faust)>threshold) if (abs(real_norm - norm_faust)>threshold)
error(['norm : invalid result, expected ' num2str(real_norm) ' get norm_faust' num2str(norm_faust)]); error(['norm : invalid result, expected ' num2str(real_norm) ' get norm_faust' num2str(norm_faust)]);
end end
if (norm_faust ~= norm_faust2)
error(['norm : norm(F) must be equal to norm(F,2)']);
end
if (norm_faust_trans ~= norm_faust)
error(['norm : norm(F) must be equal to norm(F_trans)']);
end
disp('Ok'); disp('Ok');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment