Software
No available software at the moment.
Matlab Toolbox for Finite Frames
I am currently writing a Matlab toolbox for finite frames. Please check back here in 2015.
Matlab code (NB! Only a Test Example showing Syntax Highlighting)
We want to approximate the sum \sum_{k=1}^\infty 1/k^2=\pi^2/6. This is implemented in Matlab by the following code:
% for loops in Matlab
% Set the number of terms
n=10;
% initialize sum
Q=0;
% summing over k
for k=1:n
Q=Q+1/k^2;
end
sprintf('Approximation with %d terms: Q = %0.10g',n,Q)
% Set the number of terms
n=10;
% initialize sum
Q=0;
% summing over k
for k=1:n
Q=Q+1/k^2;
end
sprintf('Approximation with %d terms: Q = %0.10g',n,Q)
Modify n=10
in line 4 to obtain better approximations.
Approximating pi square over 6
- % for loops in Matlab
- % Set the number of terms
- n=30;
- % initialize sum
- Q=0;
- % summing over k
- for k=1:n
- Q=Q+1/k^2;
- end
- sprintf('Approximation with %d terms: Q = %0.10g',n,Q)
% for loops in Matlab % Set the number of terms n=10; % initialize sum Q=0; % summing over k for k=1:n Q=Q+1/k^2; end sprintf('Approximation with %d terms: Q = %0.10g',n,Q)