A Matlab wrapper is delivered with the FA$\mu$ST C++ library.
\paragraph{}A Matlab wrapper is delivered with the FA$\mu$ST C++ library.
It provides a user friendly new class of matrix \textbf{Faust} efficient for the multiplication with matlab built-in dense matrix class.\newline
\newline
As much as possible, a \textbf{Faust} object is handled as a normal matlab matrix, here is listing of matlab builtin function that can be applied to a Faust A :
In order to use matlab wrapper after the installation of Faust, launch Matlab.
In the Matlab terminal, set your working directory to /"HOMEDIR"/Documents/MATLAB/Faust and set the Matlab path by typing the following commands :
\begin{lstlisting}
>> % considering A is a Faust of size 10x3
>>
>> % get the size of the faust
>> [dim1,dim2] = size(A);
>>
>> % transpose a faust
>> A_trans = A';
>>
>> % multiplication by A
>> x1 = rand(3,3);
>> y1 = A*x1;
>>
>> % multiplication by A'
>> x2 = rand(10,5);
>> 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
>> coeff=A(i,j);
>> col_2=A(:,2);
>> 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
>>
>> % get the number of non-zeros coefficient
>> nz = nnz(A);
cd /"HOMEDIR"/Documents/MATLAB/Faust
setup_Faust
\end{lstlisting}
\subsection{Use a faust from a saved one}\label{sec:firstUseBuildFromSave}
\paragraph{} Now, you can run quick\_start.m script in the Matlab terminal by typing :
\begin{lstlisting}
quick_start
\end{lstlisting}
\paragraph{}In this script, first of all, a Faust of size 4000x5000 is loaded from a previous one that is saved into a matfile :