Applying Blockproc on wav audio

2 views (last 30 days)
Jin
Jin on 29 Oct 2012
Hi all,
I'm trying to block process a discrete cosine transform on a wav audio file.
From what I understand the first argument in the function should be the wav file, imported into the workspace with wavread, the second the block size and lastly the function(dct). after checking the size of the file, I see that the signal is a 4583460x2 matrix (stereo).
So my code for the blockproc is,
y = blockproc('SlavicMood.wav', [256 2], dct)
but I get an error,
??? Error using ==> dct at 29 Not enough input arguments
Does anyone know what this error means, and what the 'input argument' is referring to? I am a beginner in Matlab so any help would be greatly appreciated.
Cheers!
  1 Comment
Star Strider
Star Strider on 29 Oct 2012
That blockproc is an Image Processing Toolbox function may be relevant.

Sign in to comment.

Answers (1)

Sean de Wolski
Sean de Wolski on 29 Oct 2012
You need to use the function handle to dct, i.e. @dct.
y = blockproc('SlavicMood.wav', [256 2], @dct)

Community Treasure Hunt

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

Start Hunting!