asked on
function p=SDC(signal)
%functions to compute shifted delta cepstral from MFCC,PLP,LPC
%
%Signal is coeff of MFCC
%Author Tommy Strømhaug, 2008
%Hardcoded N, d, P, and k
%d and P considered in frames. N amd k is ints
N=7; % number of c cepstral coefficients in each cepstral vector
d=1; % time advance and delay for the delta computation
P=3; % timeshift netween consecutive blocks
k=7; % number of blocks whose delta coefficients are concatenated to form the SDC vector
[row,col]=size(signal);
sdc=[];
sdc_temp=[];
%Pad data to not get out of bound. circular padding
right=signal(:,col-9:col)
left =signal(:,1:21)
signal=cat(2,signal,left);
signal=cat(2,right,signal);
for t=11:col+10
for i=0:k-1
sdc_temp=signal(:,t+i*P+d)-signal(:,t+i*P-d);
sdc=cat(2,sdc,sdc_temp);
end
end
p=sdc;
ASKER
ASKER
A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.
TRUSTED BY
Sometimes loops are necessary even in Matlab... :-)
Since I do not have your signal file I can only look at the code. I would suggest first that you examine your program when you do processing and see exactly what steps are taking time. Once you look at this it may give you some ideas of where to look at speed increases.
To examine your code run Matlab's profiler:
>> profile on %start profiler
>> p=SDC(signal) %run your program
>> profile off %stop profiler
>> profreport %make the profile report. You can see exactly what steps take time and you can click on individual lines to see what inside them takes time
Maybe this can help you fix the problem. If not then I suggest you post some "signal file" to here so that your code can be run.
Good luck.
/Dan