c=franaiter(F,f); [c,relres,iter]=franaiter(F,f,...);
| F | Frame. |
| f | Signal. |
| Ls | Length of signal. |
| c | Array of coefficients. |
| relres | Vector of residuals. |
| iter | Number of iterations done. |
c=franaiter(F,f) computes the frame coefficients c of the signal f using an iterative method such that perfect reconstruction can be obtained using frsyn. franaiter always works, even when frana cannot generate perfect reconstruction coefficients.
[c,relres,iter]=franaiter(...) additionally returns the relative residuals in a vector relres and the number of iteration steps iter.
Note: If it is possible to explicitly calculate the canonical dual frame then this is usually a much faster method than invoking franaiter.
franaiter takes the following parameters at the end of the line of input arguments:
| 'tol',t | Stop if relative residual error is less than the specified tolerance. Default is 1e-9 (1e-5 for single precision) |
| 'maxit',n | Do at most n iterations. |
| 'pg' | Solve the problem using the Conjugate Gradient algorithm. This is the default. |
| 'pcg' | Solve the problem using the Preconditioned Conjugate Gradient algorithm. |
| 'print' | Display the progress. |
| 'quiet' | Don't print anything, this is the default. |
The following example shows how to rectruct a signal without ever using the dual frame:
f=greasy;
F=frame('dgtreal','gauss',40,60);
[c,relres,iter]=franaiter(F,f,'tol',1e-14);
r=frsyn(F,c);
norm(f-r)/norm(f)
semilogy(relres);
title('Conversion rate of the CG algorithm');
xlabel('No. of iterations');
ylabel('Relative residual');