## Diff of /demos/demo_audioshrink.m[e6709d] .. [2f5a82]  Maximize  Restore

### Switch to unified view

a/demos/demo_audioshrink.m b/demos/demo_audioshrink.m
`...`
`...`
48
```% -----------
```
48
```% -----------
```
49
49
50
```% Create a WMDCT basis with 256 channels
```
50
```% Create a WMDCT basis with 256 channels
```
51
```F1=frametight(frame('wmdct','gauss',256));
```
51
```F1=frametight(frame('wmdct','gauss',256));
```
52
52
53
```% Compute wmdct coefficients
```
54
```c1 = frana(F1,nsig);
```
55
56
```% Group lasso and invert
```
53
```% Group lasso and invert
```
57
```c1s = franagrouplasso(F1,c1,0.8,'soft','freq');
```
54
```c1 = franagrouplasso(F1,nsig,0.8,'soft','freq');
```
58
```rec1 = frsyn(F1,c1s);
```
55
```rec1 = frsyn(F1,c1);
```
59
56
60
```% Transient layer
```
57
```% Transient layer
```
61
```% ---------------
```
58
```% ---------------
```
62
59
63
```% Create a WMDCT basis with 32 channels
```
60
```% Create a WMDCT basis with 32 channels
```
64
```F2=frametight(frame('wmdct','gauss',32));
```
61
```F2=frametight(frame('wmdct','gauss',32));
```
65
62
66
```% Compute wmdct coefficients
```
67
```c2 = frana(F2,nsig);
```
68
69
```c2s = franagrouplasso(F2,c2,0.5,'soft','time');
```
63
```c2 = franagrouplasso(F2,nsig,0.5,'soft','time');
```
70
```rec2 = frsyn(F2,c2s);
```
64
```rec2 = frsyn(F2,c2);
```
71
65
72
```% Plots
```
66
```% Plots
```
73
```% -----
```
67
```% -----
```
74
68
75
```% Dynamic range for plotting
```
69
```% Dynamic range for plotting
```
`...`
`...`
81
```plot(xplot,rec1);
```
75
```plot(xplot,rec1);
```
82
```xlabel('Time (s)');
```
76
```xlabel('Time (s)');
```
83
```axis tight;
```
77
```axis tight;
```
84
78
85
```subplot(2,2,2);
```
79
```subplot(2,2,2);
```
86
```imagesc(log(abs(framecoef2tf(F1,c1)+0.00001)));
```
87
```set(gca,'ydir','normal');
```
88
```%plotframe(F1,c1,fs,dr);
```
80
```plotframe(F1,c1,fs,dr);
```
89
81
90
```subplot(2,2,3);
```
82
```subplot(2,2,3);
```
91
```plot(xplot,rec2);
```
83
```plot(xplot,rec2);
```
92
```xlabel('Time (s)');
```
84
```xlabel('Time (s)');
```
93
```axis tight;
```
85
```axis tight;
```
94
86
95
```subplot(2,2,4);
```
87
```subplot(2,2,4);
```
96
```imagesc(log(abs(framecoef2tf(F2,c2)+0.00001)));
```
97
```set(gca,'ydir','normal');
```
98
```%plotframe(F2,c2,fs,dr);
```
88
```plotframe(F2,c2,fs,dr);
```
99
89
100
```% Count the number of non-zero coefficients
```
90
```% Count the number of non-zero coefficients
```
101
```N1=sum(abs(c1s)>0);
```
91
```N1=sum(abs(c1)>0);
```
102
```N2=sum(abs(c2s)>0);
```
92
```N2=sum(abs(c2)>0);
```
103
93
104
```p1 = 100*N1/siglen;
```
94
```p1 = 100*N1/siglen;
```
105
```p2 = 100*N2/siglen;
```
95
```p2 = 100*N2/siglen;
```
106
```p=p1+p2;
```
96
```p=p1+p2;
```
107
97