??? Undefined function or method 'l1eq_pd' for input arguments of type
'double'.
Error in ==> dspproject at 53
xp = l1eq_pd(x0,A,[],y,1e-2);
My code is
clc;
clear all;
Fs=10000;
x=wavread('speech3_10k');
figure(1)
stem(x)
title( 'input speech signal(recorded)');
xlabel('Length of the input speech signal');
ylabel('Amplitude of the input speech signal');
% Reecorded signal DCT
drec=dct(x);
figure(2)
stem(drec)
axis([0 3000 -1 1]);
title('Discrete cosine transform of the recorded signal');
xlabel('DCT Length');
ylabel('DCT amplitude');
% Making a signal sparse (Thresholding)
for i=1:1:3000;
if drec(i,1)<=0.08 && drec(i,1)>=0.04
drec(i,1)=0;
else
drec(i,1)=drec(i,1);
end
end
drec;
figure(3)
stem(drec)
axis([0 3000 -1 1]);
title('The Threshold spectrum');
xlabel('threshold spectrum length');
ylabel('threshold spectrum amplitude');
% K=>sparsity & N=>length)
K=64;
N=320;
% Random measurement matrix
A = randn(2,24006);
A = orth(A')';
figure(4)
imagesc(A)
colorbar;
colormap('lines');
title('Random Measurement matrix');
% observations vector
y = A*drec;
figure(5)
plot(y)
title('Observation Vector');
%initial guess = min energy
x0 = A'*y;
%solve the LP
tic
xp = l1eq_pd(x0,A,[],y,1e-2);
toc
figure(6)
plot(xp)
axis([0 3000 -0.6 0.6]);
title(' Reconstructed Spectrum using l1-minimization');
% Inv dicrete cosine transform of reconstructed signal
Xrec=idct(xp);
wavplay(Xrec,Fs)
figure(7)
stem(Xrec)
title('Reconstructed signal at the receiver');
xlabel('Length of the reconstructed signal');
ylabel('Amplitude of the reconstructed signl');
% Absolute error between the reconstructed and actual signal
err=(max(abs(Xrec-x)));
stem(err);
title(' Absolute Error');
xlabel('Maximum Absolute Error length');
ylabel('Maximum Absolute error')

3 commentaires

Geoff Hayes
Geoff Hayes le 20 Avr 2014
Hi Manipal,
It almost sounds like your are missing the function l1eq_pd which is typically what this error implies. From the command line type:
help l1eq_pd
What is returned? Is there a description for this function? If not, then the function is missing.
Geoff
Manipal Reddy Kuchakuntla
Manipal Reddy Kuchakuntla le 22 Avr 2014
I got to use the l1eq function. But the code I am trying execute isn't going good. Can anyone help me out.
When I am playing Xrec{wavplay(Xrec)};it is not the desired output. Its just a beep sound.
Manipal Reddy Kuchakuntla
Manipal Reddy Kuchakuntla le 22 Avr 2014
I got to use the l1eq function. But the code I am trying execute isn't going good. Can anyone help me out.
When I am playing Xrec{wavplay(Xrec)};it is not the desired output. Its just a beep sound.

Connectez-vous pour commenter.

 Réponse acceptée

Star Strider
Star Strider le 20 Avr 2014
Modifié(e) : Star Strider le 20 Avr 2014

0 votes

3 commentaires

Manipal Reddy Kuchakuntla
Manipal Reddy Kuchakuntla le 20 Avr 2014
I got some code from the links you gave me. But are they true for all. Or there is separate code for each and every equation.
Thank You
Star Strider
Star Strider le 20 Avr 2014
My pleasure!
I did an Internet search for the file you were missing, and at least one of those promised to have it.
Manipal Reddy Kuchakuntla
Manipal Reddy Kuchakuntla le 22 Avr 2014
I got to use the l1eq function. But the code I am trying execute isn't going good. Can anyone help me out.
When I am playing Xrec{wavplay(Xrec)};it is not the desired output. Its just a beep sound.

Connectez-vous pour commenter.

Plus de réponses (3)

Shreyas Shenoy
Shreyas Shenoy le 20 Juin 2014
Modifié(e) : Shreyas Shenoy le 20 Juin 2014

1 vote

If you want to use the l1eq_pd function without errors, here's what you have to do!
Step 1:
Step 2:
  • Open MATLAB. Click on 'Set path' option.
Step 3:
  • Click on the option "Add with sub folders" and then select the folder "l1 magic" in the new window that opens.
Finally : Click on save once this window opens.
And now, you are good to go! :-)
Manipal Reddy Kuchakuntla
Manipal Reddy Kuchakuntla le 20 Avr 2014

0 votes

Hi Geoff
Yes I have a problem with the function. There is no such function.
What is that I can do. Help me out. Thank You Manipal
Manipal Reddy Kuchakuntla
Manipal Reddy Kuchakuntla le 22 Avr 2014

0 votes

I got to use the l1eq function. But the code I am trying execute isn't going good. Can anyone help me out.
When I am playing Xrec{wavplay(Xrec)};it is not the desired output. Its just a beep sound.

Catégories

En savoir plus sur Audio Processing Algorithm Design dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by